aboutsummaryrefslogtreecommitdiffstats
path: root/vim/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc51
1 files changed, 50 insertions, 1 deletions
diff --git a/vim/vimrc b/vim/vimrc
index d84adfa..7b6edbe 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -129,9 +129,58 @@ Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-fugitive'
Plug 'SirVer/UltiSnips'
Plug 'honza/vim-snippets'
-"Plug 'dense-analysis/ale'
+Plug 'dense-analysis/ale'
call plug#end()
+" ALE
+let g:ale_enabled = 1
+let g:ale_set_balloons = 0
+let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
+let g:ale_sign_error = '!'
+let g:ale_sign_warning = '?'
+let g:ale_lint_on_text_changed = 1
+let g:ale_hover_cursor = 1
+let g:ale_virtualtext_cursor = 'disabled'
+let g:ale_sign_column_always = 1
+let g:ale_open_list = 0
+let g:ale_set_highlights = 1
+let g:ale_set_signs = 1
+let g:ale_set_loclist = 1
+let g:ale_set_quickfix = 1
+let g:ale_echo_cursor = 1
+let g:ale_echo_msg_error_str = 'ALE Error'
+let g:ale_echo_msg_format = 'ALE: %linter% - %code: %%s'
+let g:ale_loclist_msg_format = 'ALE: %linter% - %code: %%s'
+let g:ale_echo_msg_warning_str = 'ALE Warning'
+let g:ale_linters = {'python': ['pyright', 'ruff', 'flake8', 'mypy'],
+\ 'ocaml': ['merlin'],
+\ 'javascript': ['eslint'],
+\ 'cpp': ['clangd'],
+\ 'yaml': ['yamllint'],
+\ 'c': ['clangd'],
+\ 'go': ['gopls', 'golint', 'gofmt'],
+ \}
+let g:ale_fixers = {
+\ 'python': ['autoimport', 'ruff', 'isort', 'yapf', 'black'],
+\ 'javascript': ['eslint'],
+\ 'go': ['gofmt', 'goimports', 'gopls'],
+\ 'cpp': ['clang-format'],
+\ 'c': ['clang-format'],
+\ 'rust': ['rustfmt']
+\ }
+let g:ale_python_mypy_ignore_invalid_syntax = 1
+let g:ale_python_mypy_executable = 'mypy'
+let g:ale_python_mypy_options = '--config-file mypy.ini'
+" let g:ale_sign_error = '>>'
+let g:ale_fix_on_save = 1
+let g:ale_linters_explicit = 0
+let g:ale_completion_enabled = 0
+" Map movement through errors without wrapping.
+" nmap <silent> <C-k> <Plug>(ale_previous)
+" nmap <silent> <C-j> <Plug>(ale_next)
+" OR map keys to use wrapping.
+nmap <silent> <C-k> <Plug>(ale_previous_wrap)
+nmap <silent> <C-j> <Plug>(ale_next_wrap)
set background=dark
"syntax off