2024-01-02 19:42:41 +01:00
|
|
|
local M = { "nvimtools/none-ls.nvim" }
|
2023-11-23 21:27:17 +01:00
|
|
|
|
|
|
|
M.event = { "BufReadPre", "BufNewFile" }
|
|
|
|
|
2024-01-24 00:48:37 +01:00
|
|
|
M.dependencies = { "mason-null-ls.nvim" }
|
|
|
|
|
2023-11-23 21:27:17 +01:00
|
|
|
M.opts = function()
|
|
|
|
local nls = require("null-ls")
|
|
|
|
return {
|
2024-01-02 19:42:41 +01:00
|
|
|
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", "Makefile", ".git"),
|
2023-11-23 21:27:17 +01:00
|
|
|
sources = {
|
2024-01-02 19:42:41 +01:00
|
|
|
-- shell
|
2023-11-23 21:27:17 +01:00
|
|
|
nls.builtins.formatting.shfmt,
|
2024-01-02 19:42:41 +01:00
|
|
|
nls.builtins.code_actions.shellcheck,
|
|
|
|
-- python
|
2023-11-23 21:27:17 +01:00
|
|
|
nls.builtins.formatting.black,
|
2024-01-02 19:42:41 +01:00
|
|
|
-- perl
|
|
|
|
nls.builtins.formatting.perltidy,
|
|
|
|
-- Various (yaml, markdown, json among others)
|
|
|
|
nls.builtins.formatting.prettierd,
|
2023-11-23 21:27:17 +01:00
|
|
|
},
|
2024-01-24 10:53:48 +01:00
|
|
|
on_attach = function()
|
|
|
|
return { on_attach = require("funcs").lsp_on_attach }
|
|
|
|
end
|
2023-11-23 21:27:17 +01:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|