From a03f770d4147a46ada2c353601bccf18ae3524e4 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Fri, 18 Dec 2020 13:49:36 +0100 Subject: [PATCH] Further vim changes --- vimrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 539abb5..3a650fe 100644 --- a/vimrc +++ b/vimrc @@ -21,6 +21,8 @@ set autoindent set hlsearch set showmatch set wildignore+=*.log,*.sql,*.cache +set wildmode=longest,list,full +set wildmenu set number set relativenumber set ruler @@ -59,6 +61,8 @@ nnoremap Q @@ nmap an :ALENextWrap nmap ap :ALEPreviousWrap nmap ad :ALEDetail +inoremap + \ pumvisible() ? "\" : "\" " Markdown configuration: autocmd FileType markdown setlocal wrap linebreak @@ -79,7 +83,11 @@ set laststatus=2 " Vim-Go configuration: let g:go_fmt_autosave = 0 -let g:go_imports_autosave = 0 +" Vim-Go seems to handle fix-on-save better than ALE: +let g:go_imports_autosave = 1 +let g:go_fmt_options = { + \ 'goimports': '-local github.com/sensiblecode.com/cantabular', + \ } 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' @@ -97,7 +105,7 @@ let g:ale_linters = { let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], \ 'javascript': ['prettier'], - \ 'go': ['goimports'], + \ 'go': [], \ 'rust': ['rustfmt'] \ } let g:ale_fix_on_save = 1