2023-08-27 18:22:29 +00:00
|
|
|
return {
|
|
|
|
"w0rp/ale",
|
|
|
|
lazy = false,
|
|
|
|
keys = {
|
|
|
|
{'<leader>=', '<Plug>(ale_fix)', mode = 'n'},
|
|
|
|
},
|
|
|
|
config = function ()
|
|
|
|
local g = vim.g
|
|
|
|
|
|
|
|
g.ale_linters = {
|
|
|
|
javascript = {'{{ if .nvim.js_linter }}{{ .nvim.js_linter }}{{ else }}eslint{{ end }}'},
|
|
|
|
typescript = {'{{ if .nvim.js_linter }}{{ .nvim.js_linter }}{{ else }}eslint{{ end }}'},
|
|
|
|
go = {'gopls'},
|
|
|
|
rust = {'analyzer'},
|
2023-09-01 14:41:00 +00:00
|
|
|
sh = {'shellcheck'},
|
2023-08-27 18:22:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
g.ale_fixers = {
|
|
|
|
javascript = {'{{ if .nvim.js_fixer }}{{ .nvim.js_fixer }}{{ else }}eslint{{ end }}'},
|
|
|
|
typescript = {'{{ if .nvim.js_fixer }}{{ .nvim.js_fixer }}{{ else }}eslint{{ end }}'},
|
|
|
|
}
|
|
|
|
|
|
|
|
g.ale_linters_explicit = 1
|
|
|
|
g.ale_lint_on_save = 1
|
|
|
|
g.ale_fix_on_save = 1
|
|
|
|
end
|
|
|
|
}
|