attempt at getting bash code_actions
This commit is contained in:
parent
8334d90950
commit
9ebeb43013
3 changed files with 26 additions and 1 deletions
7
.config/nvim/lua/config/lsp/null.lua
Normal file
7
.config/nvim/lua/config/lsp/null.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
return function()
|
||||
local nb = require("null-ls").builtins
|
||||
return {
|
||||
nb.code_actions.shellcheck,
|
||||
nb.diagnostics.shellcheck
|
||||
}
|
||||
end
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue