config/nvim/lua/languages.lua

36 lines
920 B
Lua

-- Linting & Autocomplete Setup
-- ALE settings
-- Which linters to use
vim.g.ale_linters = {
["java"] = {"javac"},
["python"] = {"pycodestyle", "pydocstyle", "bandit", "mypy", "vulture"},
["lua"] = {"luac", "luacheck"},
}
-- When to run linters
vim.g.ale_lint_on_text_changed = 1
vim.g.ale_lint_on_insert_leave = 0
vim.g.ale_lint_on_enter = 1
vim.g.ale_lint_on_save = 1
vim.g.ale_lint_on_filetype_change = 1
-- How to display linting hints to the user
vim.g.ale_set_loclist = 0
-- vim.g.ale_set_quickfix = 0
vim.g.ale_set_highlights = 1
vim.g.ale_set_signs = 1
vim.g.ale_echo_cursor = 1
vim.g.ale_set_balloons = 1
-- ALE completion settings
-- Enable completion
vim.g.ale_completion_enabled = 1
-- What are the units for completion delay? ms? s?
-- vim.g.ale_completion_delay = 500
vim.g.ale_completion_max_suggestions = 6
-- zig.vim config
-- Do not autoformat code on save
vim.g.zig_fmt_autosave = 0