2024-04-04 15:23:10 -03:00
|
|
|
-- Customize None-ls sources
|
|
|
|
|
|
|
|
---@type LazySpec
|
2024-02-16 19:39:03 -03:00
|
|
|
return {
|
2024-04-04 15:23:10 -03:00
|
|
|
"nvimtools/none-ls.nvim",
|
2024-02-16 19:39:03 -03:00
|
|
|
opts = function(_, config)
|
|
|
|
-- config variable is the default configuration table for the setup function call
|
2024-04-11 20:02:33 -03:00
|
|
|
local null_ls = require("null-ls")
|
2024-02-16 19:39:03 -03:00
|
|
|
|
|
|
|
-- Check supported formatters and linters
|
2024-04-04 15:23:10 -03:00
|
|
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
|
|
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
2024-02-16 19:39:03 -03:00
|
|
|
config.sources = {
|
|
|
|
-- Set a formatter
|
2024-06-24 03:20:30 -03:00
|
|
|
null_ls.builtins.formatting.nixfmt,
|
2024-02-16 19:39:03 -03:00
|
|
|
null_ls.builtins.formatting.prettier,
|
|
|
|
null_ls.builtins.formatting.stylua,
|
|
|
|
}
|
2024-04-04 15:23:10 -03:00
|
|
|
return config -- return final config table
|
2024-02-16 19:39:03 -03:00
|
|
|
end,
|
|
|
|
}
|