Files
nvim/lua/linterconfiguration.lua
Nina Chlóe Kassandra Reiß 952048bd59
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 1m5s
Add ALE fixer for various programming languages
2026-03-28 11:37:43 +01:00

41 lines
1.0 KiB
Lua

-- Ale configuration
vim.g.ale_linters_explicit = 0
local linters = {
ada = { "gnat", "gcc", "adals", "cspell" },
c = { "clang" },
cpp = { "clang" },
latex = { "proselint" },
markdown = { "languagetool" },
plaintex = { "proselint" },
python = { "pylint" },
tex = { "proselint" },
vhdl = {},
vim = { "vint" },
}
local fixers = {
ada = { "gnatpp" },
asm = { "gcc" },
bash = { "bashate" },
c = { "astyle" },
haskell = { "fourmolu" },
html = { "prettier", "html-beautify" },
latex = { "texlab", "textlint" },
lua = { "stylua" },
markdown = { "prettier", "pandoc" },
nix = { "nixfmt" },
pascal = { "ptop" },
python = { "yapf", "ruff", "autopep8" },
rust = { "rustfmt" },
tex = { "textlint", "latexindent" },
}
vim.g.ale_linters = linters
vim.g.ale_fix_on_save = 0
vim.g.ale_fixers = fixers
-- vim.g.ale_vhdl_ghdl_options = "--std=08 --workdir=src/"
vim.keymap.set("n", "<leader>lf", ":ALEFix<CR>")
vim.keymap.set("n", "<leader>lr", ":ALEFindReferences<CR>")
vim.keymap.set("n", "<leader>ln", ":ALENext<CR>")