diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index 41385d1..a779e79 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -7,6 +7,7 @@ map gv :vsplit:GoAlternate! map gs :split:GoAlternate! map gt :w :GoTest map gf :w :GoTestFunc +nnoremap gd :GoToDefinition nnoremap dr :GoDebugBreakpoint nnoremap d! :GoDebugStart @@ -25,6 +26,9 @@ let g:go_info_mode = "gopls" let g:go_highlight_functions = 1 let g:go_term_enabled = 0 let g:go_term_close_on_exit = 0 +let g:go_gopls_analyses = { + \ 'composites': v:false, + \ } let g:go_fmt_options = { \ 'goimports': '-local github.com/sensiblecode.com/cantabular', \ } diff --git a/vimrc b/vimrc index d956e64..050ec13 100644 --- a/vimrc +++ b/vimrc @@ -11,11 +11,19 @@ let g:netrw_list_hide = '^\.' let g:netrw_winsize=25 map n :Lexplore +" 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 shiftround -set tabstop=2 +" set tabstop=8 set expandtab -set smarttab +" set smarttab set splitbelow set splitright set encoding=utf-8 @@ -89,7 +97,8 @@ imap nnoremap ,/ :nohlsearch map :tabnew " Select just-pasted text: -nnoremap 0 `[v`] +nnoremap 0 `[v`] +nnoremap 1 :set relativenumber! map m :marks map R :registers map v :vsplit @@ -205,7 +214,6 @@ let g:ale_rust_analyzer_config = { \ 'checkOnSave': { 'command': 'clippy', 'enable': v:true }, \ } 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_completion_enabled = 0 let g:ale_close_preview_on_insert = 1 @@ -239,5 +247,6 @@ packadd! lightline.vim packadd! tmux-complete.vim packadd! vim-commentary packadd! vim-gitgutter +packadd! vim-go packadd! vim-surround packadd! vim-yaml-folds