summaryrefslogtreecommitdiff
path: root/ale.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ale.lua')
-rw-r--r--ale.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/ale.lua b/ale.lua
new file mode 100644
index 0000000..fc6b54e
--- /dev/null
+++ b/ale.lua
@@ -0,0 +1,34 @@
+return {
+ {
+ "dense-analysis/ale",
+ ft = { "*" }, -- load for all filetypes
+ config = function()
+ -- Enable ALE linting
+ vim.g.ale_enabled = 1
+ vim.g.ale_lint_on_text_changed = "always"
+ vim.g.ale_lint_on_insert_leave = 1
+ vim.g.ale_sign_error = "✗"
+ vim.g.ale_sign_warning = "⚠"
+ vim.g.ale_sign_info = "ℹ"
+
+ -- Fixers
+ vim.g.ale_fixers = {
+ python = { "black", "isort" },
+ r = { "styler" },
+ lua = { "stylua" },
+ tex = { "latexindent" },
+ }
+
+ -- Automatically fix files on save
+ vim.g.ale_fix_on_save = 1
+
+ -- Optional: choose linters per language
+ vim.g.ale_linters = {
+ python = { "flake8", "mypy" },
+ r = { "lintr" },
+ lua = { "luacheck" },
+ tex = { "chktex" },
+ }
+ end,
+ },
+}