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:
parent
08f4175412
commit
30247ce3a0
|
@ -68,6 +68,7 @@ in
|
||||||
lsp-format-nvim # Simplified formatting configuration
|
lsp-format-nvim # Simplified formatting configuration
|
||||||
lsp_lines-nvim # Show diagnostics *over* regions
|
lsp_lines-nvim # Show diagnostics *over* regions
|
||||||
none-ls-nvim # LSP integration for linters and formatters
|
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.withAllGrammars # Better highlighting
|
||||||
nvim-treesitter-textobjects # More textobjects
|
nvim-treesitter-textobjects # More textobjects
|
||||||
nvim-ts-context-commentstring # Comment string in nested language blocks
|
nvim-ts-context-commentstring # Comment string in nested language blocks
|
||||||
|
|
|
@ -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
|
-- Nix
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
null_ls.builtins.formatting.nixpkgs_fmt.with({
|
null_ls.builtins.formatting.nixpkgs_fmt.with({
|
||||||
|
@ -50,16 +42,6 @@ null_ls.register({
|
||||||
|
|
||||||
-- Python
|
-- Python
|
||||||
null_ls.register({
|
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({
|
null_ls.builtins.diagnostics.mypy.with({
|
||||||
-- Only used if available
|
-- Only used if available
|
||||||
condition = utils.is_executable_condition("mypy"),
|
condition = utils.is_executable_condition("mypy"),
|
||||||
|
@ -81,13 +63,13 @@ null_ls.register({
|
||||||
|
|
||||||
-- Shell (non-POSIX)
|
-- Shell (non-POSIX)
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
null_ls.builtins.code_actions.shellcheck.with({
|
require("none-ls-shellcheck.diagnostics").with({
|
||||||
-- Restrict to bash and zsh
|
-- Restrict to bash and zsh
|
||||||
filetypes = { "bash", "zsh" },
|
filetypes = { "bash", "zsh" },
|
||||||
-- Only used if available
|
-- Only used if available
|
||||||
condition = utils.is_executable_condition("shellcheck"),
|
condition = utils.is_executable_condition("shellcheck"),
|
||||||
}),
|
}),
|
||||||
null_ls.builtins.diagnostics.shellcheck.with({
|
require("none-ls-shellcheck.code_actions").with({
|
||||||
-- Show error code in message
|
-- Show error code in message
|
||||||
diagnostics_format = "[#{c}] #{m}",
|
diagnostics_format = "[#{c}] #{m}",
|
||||||
-- Require explicit empty string test, use bash dialect
|
-- Require explicit empty string test, use bash dialect
|
||||||
|
@ -110,13 +92,13 @@ null_ls.register({
|
||||||
|
|
||||||
-- Shell (POSIX)
|
-- Shell (POSIX)
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
null_ls.builtins.code_actions.shellcheck.with({
|
require("none-ls-shellcheck.diagnostics").with({
|
||||||
-- Restrict to POSIX sh
|
-- Restrict to POSIX sh
|
||||||
filetypes = { "sh" },
|
filetypes = { "sh" },
|
||||||
-- Only used if available
|
-- Only used if available
|
||||||
condition = utils.is_executable_condition("shellcheck"),
|
condition = utils.is_executable_condition("shellcheck"),
|
||||||
}),
|
}),
|
||||||
null_ls.builtins.diagnostics.shellcheck.with({
|
require("none-ls-shellcheck.code_actions").with({
|
||||||
-- Show error code in message
|
-- Show error code in message
|
||||||
diagnostics_format = "[#{c}] #{m}",
|
diagnostics_format = "[#{c}] #{m}",
|
||||||
-- Require explicit empty string test
|
-- Require explicit empty string test
|
||||||
|
|
Loading…
Reference in a new issue