Update lsp.lua

Updating lsp config, separating lint and lsp
This commit is contained in:
Juanito 2025-09-18 16:26:16 -03:00 committed by GitHub
parent 088e844145
commit 42d46663af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 2 deletions

View File

@ -225,7 +225,7 @@ return {
gopls = {}, gopls = {},
pyright = {}, pyright = {},
rust_analyzer = {}, rust_analyzer = {},
ts_ls = {}, tsserve = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
-- Some languages (like typescript) have entire language plugins that can be useful: -- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim -- https://github.com/pmizio/typescript-tools.nvim
@ -268,7 +268,7 @@ return {
ensure_installed = ensure_installed, ensure_installed = ensure_installed,
auto_update = false, auto_update = false,
} }
local null_ls = require("null_ls") local null_ls = require("null-ls")
null_ls.setup({ null_ls.setup({
sources = { sources = {
null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.stylua,
@ -292,6 +292,24 @@ return {
} }
end, end,
}, },
-- Linters
{
"nvimtools/none-ls.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
-- Only diagnostics/linters here (NOT formatting)
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.markdownlint,
null_ls.builtins.diagnostics.yamllint,
null_ls.builtins.diagnostics.ansiblelint,
},
})
end,
},
-- Autocompletion -- Autocompletion
{ {