Linter and Correction update

This commit is contained in:
2024-07-08 20:28:54 +02:00
parent 39b9d351c0
commit 7e89acf09f
3 changed files with 34 additions and 20 deletions

View File

@@ -98,3 +98,31 @@ vim.cmd([[
autocmd BufWritePost *.v lua vim.lsp.buf.format({ async = false })
]])
-- Ale configuration
local linters = {
python = { "pylint" },
vim = { "vint" },
cpp = { "clang" },
c = { "clang" },
markdown = { "languagetool" },
latex = { "languagetool" },
tex = { "languagetool" },
ada = { "gnat" },
}
vim.g.ale_linters = linters
vim.g.ale_fix_on_save = 0
vim.g.ale_ada_gpr_project_file = "default.gpr"
vim.g.ale_fixers = {
ada = { "gcc", "gnat" },
asm = { "gcc" },
bash = { "bashate" },
c = { "astyle" },
latex = { "texlab" },
lua = { "stylua" },
markdown = { "prettier", "pandoc" },
}
vim.keymap.set("n", "<leader>lf", ":ALEFix<CR>")
vim.keymap.set("n", "<leader>ld", ":ALEDetail<CR>")