Further vim changes
This commit is contained in:
parent
f13c93f025
commit
a03f770d41
12
vimrc
12
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 <silent> <leader>an :ALENextWrap<cr>
|
||||
nmap <silent> <leader>ap :ALEPreviousWrap<cr>
|
||||
nmap <silent> <leader>ad :ALEDetail<cr>
|
||||
inoremap <silent><expr> <Tab>
|
||||
\ pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
|
||||
" 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
|
||||
|
|
Loading…
Reference in New Issue