1
0
Fork 0

new null-ls

This commit is contained in:
Luca Bilke 2024-01-02 19:42:41 +01:00
parent 5e58fa5fef
commit 6d4528a224
2 changed files with 10 additions and 5 deletions

View File

@ -22,7 +22,7 @@ M.keys = {
}
local opts = {
ensure_installed = { "lua_ls" },
ensure_installed = { "lua_ls", "bashls" },
handlers = {
function(server_name)
require("lspconfig")[server_name].setup({})

View File

@ -1,4 +1,4 @@
local M = { "jose-elias-alvarez/null-ls.nvim" }
local M = { "nvimtools/none-ls.nvim" }
M.event = { "BufReadPre", "BufNewFile" }
@ -7,12 +7,17 @@ M.dependencies = { "mason.nvim" }
M.opts = function()
local nls = require("null-ls")
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 = {
--nls.builtins.formatting.stylua,
-- shell
nls.builtins.formatting.shfmt,
nls.builtins.code_actions.shellcheck,
-- python
nls.builtins.formatting.black,
--nls.builtins.diagnostics.flake8,
-- perl
nls.builtins.formatting.perltidy,
-- Various (yaml, markdown, json among others)
nls.builtins.formatting.prettierd,
},
}
end