new null-ls
This commit is contained in:
parent
07ff52dfdd
commit
cc38f04a93
2 changed files with 10 additions and 5 deletions
.config/nvim/lua/plugins/lsp
|
@ -22,7 +22,7 @@ M.keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
ensure_installed = { "lua_ls" },
|
ensure_installed = { "lua_ls", "bashls" },
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require("lspconfig")[server_name].setup({})
|
require("lspconfig")[server_name].setup({})
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local M = { "jose-elias-alvarez/null-ls.nvim" }
|
local M = { "nvimtools/none-ls.nvim" }
|
||||||
|
|
||||||
M.event = { "BufReadPre", "BufNewFile" }
|
M.event = { "BufReadPre", "BufNewFile" }
|
||||||
|
|
||||||
|
@ -7,12 +7,17 @@ M.dependencies = { "mason.nvim" }
|
||||||
M.opts = function()
|
M.opts = function()
|
||||||
local nls = require("null-ls")
|
local nls = require("null-ls")
|
||||||
return {
|
return {
|
||||||
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"),
|
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", "Makefile", ".git"),
|
||||||
sources = {
|
sources = {
|
||||||
--nls.builtins.formatting.stylua,
|
-- shell
|
||||||
nls.builtins.formatting.shfmt,
|
nls.builtins.formatting.shfmt,
|
||||||
|
nls.builtins.code_actions.shellcheck,
|
||||||
|
-- python
|
||||||
nls.builtins.formatting.black,
|
nls.builtins.formatting.black,
|
||||||
--nls.builtins.diagnostics.flake8,
|
-- perl
|
||||||
|
nls.builtins.formatting.perltidy,
|
||||||
|
-- Various (yaml, markdown, json among others)
|
||||||
|
nls.builtins.formatting.prettierd,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue