diff --git a/vimrc b/vimrc index 97bacc0..f43042b 100644 --- a/vimrc +++ b/vimrc @@ -56,8 +56,8 @@ map nnoremap p `[v`] nnoremap Q @@ " Skip to next linter problems: -nmap :ALENext -nmap :ALEPrevious +nmap an :ALENext +nmap ap :ALEPrevious " Markdown configuration: autocmd FileType markdown setlocal wrap linebreak @@ -80,6 +80,9 @@ set laststatus=2 let g:go_fmt_autosave = 0 let g:go_imports_autosave = 0 autocmd BufNewFile,BufRead *.gohtml set syntax=gohtmltmpl +" https://github.com/golang/tools/blob/master/gopls/doc/vim.md#vim-go +let g:go_def_mode='gopls' +let g:go_info_mode='gopls' " Vim-Rust configuration: let g:rustfmt_autosave = 0 @@ -87,13 +90,13 @@ let g:rustfmt_autosave = 0 " ALE configuration: let g:ale_linters = { \ 'javascript': ['eslint'], - \ 'go': ['govet', 'golint'], + \ 'go': ['gopls'], \ 'rust': ['cargo'] \ } let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], \ 'javascript': ['prettier'], - \ 'go': ['gofmt', 'goimports'], + \ 'go': ['goimports'], \ 'rust': ['rustfmt'] \ } let g:ale_fix_on_save = 1 @@ -103,3 +106,6 @@ let g:ale_lint_on_insert_leave = 1 let g:ale_lint_on_save = 1 let g:ale_echo_cursor = 1 let g:ale_rust_cargo_use_clippy = 0 +let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular' +let g:ale_command_wrapper = 'nice -n5' +let g:ale_completion_enabled = 1