]> git.madduck.net Git - etc/neovim.git/blob - .config/nvim/plugin/ale.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

disable tab completion
[etc/neovim.git] / .config / nvim / plugin / ale.lua
1 ale = prequire("ale")
2
3 if ale then
4         vim.keymap.set({ "n", "i" }, "<F7>", [[<cmd>ALELint<CR>]])
5         vim.keymap.set({ "n", "i" }, "<F8>", [[<cmd>ALEFix<CR>]])
6
7         vim.keymap.set("n", "<C-k>", "<Plug>(ale_previous_wrap)")
8         vim.keymap.set("n", "<C-j>", "<Plug>(ale_next_wrap)")
9
10         vim.g.ale_completion_enabled = true
11         vim.g.ale_echo_msg_format = "%code: %%s [%linter%]"
12         vim.g.ale_fixers = { ["*"] = { "remove_trailing_lines", "trim_whitespace" } }
13         vim.g.ale_virtualtext_cursor = "current"
14
15         vim.g.ale_open_list = true
16         vim.g.ale_use_neovim_diagnostics_api = false
17
18         vim.g.ale_lint_on_text_changed = false
19         vim.g.ale_lint_on_insert_leave = true
20         vim.g.ale_lint_on_enter = true
21
22         -- Cannot use `vim.opt_local.signcolumn` due to
23         -- https://github.com/neovim/neovim/issues/14670
24         vim.cmd("setlocal signcolumn=no")
25 else
26         print("ALE is not installed")
27 end