1
0
Fork 0
dotfiles/.config/nvim/lua/plugins/lsp/null-ls.lua

29 lines
799 B
Lua
Raw Normal View History

2024-01-02 19:42:41 +01:00
local M = { "nvimtools/none-ls.nvim" }
M.event = { "BufReadPre", "BufNewFile" }
2024-01-24 00:48:37 +01:00
M.dependencies = { "mason-null-ls.nvim" }
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"),
sources = {
2024-01-02 19:42:41 +01:00
-- shell
nls.builtins.formatting.shfmt,
2024-01-02 19:42:41 +01:00
nls.builtins.code_actions.shellcheck,
-- python
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,
},
2024-01-24 10:53:48 +01:00
on_attach = function()
return { on_attach = require("funcs").lsp_on_attach }
end
}
end
return M