1
0
Fork 0

attempt at getting bash code_actions

This commit is contained in:
Luca Bilke 2024-01-26 13:25:09 +01:00
parent 8334d90950
commit 9ebeb43013
3 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,7 @@
return function()
local nb = require("null-ls").builtins
return {
nb.code_actions.shellcheck,
nb.diagnostics.shellcheck
}
end

View file

@ -8,6 +8,14 @@ conf.handlers["intelephense"] = {
}
}
conf.handlers["bashls"] = {
settings = {
bashIde = {
shellcheckPath = vim.fn.stdpath "data" .. "mason/bin/shellcheck"
}
}
}
conf.required = { "lua_ls", "bashls" }
return conf

View file

@ -7,8 +7,18 @@ M.dependencies = { "mason-null-ls.nvim" }
M.opts = function()
return {
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", "Makefile", ".git", "ansible.cfg"),
on_attach = require("funcs").lsp_on_attach
on_attach = require("funcs").lsp_on_attach,
sources = require("config.lsp.null")(),
}
end
-- M.init = function()
-- vim.api.nvim_create_autocmd({ "LspAttach" }, {
-- desc = "Ensure null-ls run its sources a lsp client starts",
-- callback = function()
-- pcall(require("null-ls").enable, {})
-- end,
-- })
-- end
return M