home: vim: fix none-ls breaking changes

The end goal would be to remove none-ls-shellcheck-nvim, and migrate to
bashls (if it supports POSIX/non-POSIX satisfyingly).

Similarly, I should add a Haskell language server (if I ever actually
sit down to learn it...). And test out `ruff` as a `flake8` replacement.
This commit is contained in:
Bruno BELANYI 2024-03-11 11:53:19 +00:00
parent bc64e43590
commit c23185ef25
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