vimrc updates

This commit is contained in:
Rob Watson 2021-01-28 20:23:15 +01:00
parent 39f160d29f
commit 566a80cb30
2 changed files with 17 additions and 4 deletions

View File

@ -7,6 +7,7 @@ map <leader>gv <esc>:vsplit<bar>:GoAlternate!<cr>
map <leader>gs <esc>:split<bar>:GoAlternate!<cr> map <leader>gs <esc>:split<bar>:GoAlternate!<cr>
map <leader>gt <esc>:w <bar> :GoTest<cr> map <leader>gt <esc>:w <bar> :GoTest<cr>
map <leader>gf <esc>:w <bar> :GoTestFunc<cr> map <leader>gf <esc>:w <bar> :GoTestFunc<cr>
nnoremap <silent> gd :GoToDefinition
nnoremap <silent> dr :GoDebugBreakpoint<cr> nnoremap <silent> dr :GoDebugBreakpoint<cr>
nnoremap <silent> d! :GoDebugStart<cr> nnoremap <silent> d! :GoDebugStart<cr>
@ -25,6 +26,9 @@ let g:go_info_mode = "gopls"
let g:go_highlight_functions = 1 let g:go_highlight_functions = 1
let g:go_term_enabled = 0 let g:go_term_enabled = 0
let g:go_term_close_on_exit = 0 let g:go_term_close_on_exit = 0
let g:go_gopls_analyses = {
\ 'composites': v:false,
\ }
let g:go_fmt_options = { let g:go_fmt_options = {
\ 'goimports': '-local github.com/sensiblecode.com/cantabular', \ 'goimports': '-local github.com/sensiblecode.com/cantabular',
\ } \ }

17
vimrc
View File

@ -11,11 +11,19 @@ let g:netrw_list_hide = '^\.'
let g:netrw_winsize=25 let g:netrw_winsize=25
map <leader>n <esc>:Lexplore<cr> map <leader>n <esc>:Lexplore<cr>
" fix helptags for opt/ plugins
" https://vi.stackexchange.com/questions/17210/generating-help-tags-for-packages-that-are-loaded-by-vim-8s-package-management
command! -nargs=0 -bar Helptags
\ for p in glob('~/.vim/pack/git-plugins/opt/*', 1, 1)
\| exe 'packadd ' . fnamemodify(p, ':t')
\| endfor
\| helptags ALL
set shiftwidth=2 set shiftwidth=2
set shiftround set shiftround
set tabstop=2 " set tabstop=8
set expandtab set expandtab
set smarttab " set smarttab
set splitbelow set splitbelow
set splitright set splitright
set encoding=utf-8 set encoding=utf-8
@ -89,7 +97,8 @@ imap <right> <nop>
nnoremap <silent> ,/ :nohlsearch<cr> nnoremap <silent> ,/ :nohlsearch<cr>
map <c-t> <esc>:tabnew<cr> map <c-t> <esc>:tabnew<cr>
" Select just-pasted text: " Select just-pasted text:
nnoremap <Leader>0 `[v`] nnoremap <silent> <leader>0 `[v`]
nnoremap <silent> <leader>1 :set relativenumber!<cr>
map <leader>m :marks<cr> map <leader>m :marks<cr>
map <leader>R :registers<cr> map <leader>R :registers<cr>
map <leader>v :vsplit<cr> map <leader>v :vsplit<cr>
@ -205,7 +214,6 @@ let g:ale_rust_analyzer_config = {
\ 'checkOnSave': { 'command': 'clippy', 'enable': v:true }, \ 'checkOnSave': { 'command': 'clippy', 'enable': v:true },
\ } \ }
let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular' let g:ale_go_goimports_options = '-local github.com/sensiblecodeio/cantabular'
let g:ale_go_gopls_options = '' " TODO: composite keys?
let g:ale_command_wrapper = 'nice -n5' let g:ale_command_wrapper = 'nice -n5'
let g:ale_completion_enabled = 0 let g:ale_completion_enabled = 0
let g:ale_close_preview_on_insert = 1 let g:ale_close_preview_on_insert = 1
@ -239,5 +247,6 @@ packadd! lightline.vim
packadd! tmux-complete.vim packadd! tmux-complete.vim
packadd! vim-commentary packadd! vim-commentary
packadd! vim-gitgutter packadd! vim-gitgutter
packadd! vim-go
packadd! vim-surround packadd! vim-surround
packadd! vim-yaml-folds packadd! vim-yaml-folds