home: vim: null-ls: fix deprecated builtins

`none-ls` deprecated a lot of unmaintained builtins, or ones that they
find has been replaced by a compete LSP server.

This removes those deprecated builtins, or uses a shim until I migrate
to the relevant LSP configuration (for `bash-language-server`).
This commit is contained in:
Bruno BELANYI 2024-03-11 11:53:19 +00:00
parent 08f4175412
commit 30247ce3a0
2 changed files with 5 additions and 22 deletions

View file

@ -68,6 +68,7 @@ in
lsp-format-nvim # Simplified formatting configuration
lsp_lines-nvim # Show diagnostics *over* regions
none-ls-nvim # LSP integration for linters and formatters
none-ls-shellcheck-nvim # shellcheck shim for none-ls
nvim-treesitter.withAllGrammars # Better highlighting
nvim-treesitter-textobjects # More textobjects
nvim-ts-context-commentstring # Comment string in nested language blocks

View file

@ -28,14 +28,6 @@ null_ls.register({
}),
})
-- Haskell
null_ls.register({
null_ls.builtins.formatting.brittany.with({
-- Only used if available
condition = utils.is_executable_condition("brittany"),
}),
})
-- Nix
null_ls.register({
null_ls.builtins.formatting.nixpkgs_fmt.with({
@ -50,16 +42,6 @@ null_ls.register({
-- Python
null_ls.register({
null_ls.builtins.diagnostics.flake8.with({
-- Only used if available, but prefer pflake8 if available
condition = function()
return utils.is_executable("flake8") and not utils.is_executable("pflake8")
end,
}),
null_ls.builtins.diagnostics.pyproject_flake8.with({
-- Only used if available
condition = utils.is_executable_condition("pflake8"),
}),
null_ls.builtins.diagnostics.mypy.with({
-- Only used if available
condition = utils.is_executable_condition("mypy"),
@ -81,13 +63,13 @@ null_ls.register({
-- Shell (non-POSIX)
null_ls.register({
null_ls.builtins.code_actions.shellcheck.with({
require("none-ls-shellcheck.diagnostics").with({
-- Restrict to bash and zsh
filetypes = { "bash", "zsh" },
-- Only used if available
condition = utils.is_executable_condition("shellcheck"),
}),
null_ls.builtins.diagnostics.shellcheck.with({
require("none-ls-shellcheck.code_actions").with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test, use bash dialect
@ -110,13 +92,13 @@ null_ls.register({
-- Shell (POSIX)
null_ls.register({
null_ls.builtins.code_actions.shellcheck.with({
require("none-ls-shellcheck.diagnostics").with({
-- Restrict to POSIX sh
filetypes = { "sh" },
-- Only used if available
condition = utils.is_executable_condition("shellcheck"),
}),
null_ls.builtins.diagnostics.shellcheck.with({
require("none-ls-shellcheck.code_actions").with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test