Update vimrc
This commit is contained in:
parent
4a2dcce7b2
commit
82b65be3e2
|
@ -24,10 +24,8 @@ nnoremap <silent> ds :GoDebugStep<cr>
|
|||
|
||||
" Vim-Go configuration
|
||||
let g:go_gopls_enabled = 0
|
||||
let g:go_def_mapping_enabled = 0
|
||||
let g:go_fmt_autosave = 0
|
||||
" TODO: move to vim-lsp
|
||||
let g:go_imports_autosave = 1
|
||||
let g:go_imports_autosave = 0
|
||||
let g:go_auto_sameids = 0
|
||||
let g:go_auto_type_info = 0
|
||||
let g:go_code_completion_enabled = 0
|
||||
|
|
27
vimrc
27
vimrc
|
@ -96,12 +96,10 @@ augroup vimrc
|
|||
autocmd FileType qf if (getwininfo(win_getid())[0].loclist != 1) | wincmd J | endif
|
||||
augroup end
|
||||
|
||||
" But, don't remember the current directory for a given file:
|
||||
" Don't remember the current directory for a given file:
|
||||
set viewoptions-=curdir
|
||||
|
||||
" Key mappings:
|
||||
nmap <silent> <leader>/ :nohlsearch<CR>
|
||||
nmap <silent> <leader><space> :nohlsearch<CR>
|
||||
nnoremap j gj
|
||||
nnoremap k gk
|
||||
map <up> <nop>
|
||||
|
@ -115,17 +113,18 @@ imap <right> <nop>
|
|||
nmap ]q :cn<cr>
|
||||
nmap [q :cp<cr>
|
||||
|
||||
nnoremap <silent> ,/ :nohlsearch<cr>
|
||||
map <c-t> <esc>:tabnew<cr>
|
||||
nnoremap <silent> <leader><space> :nohlsearch<cr>
|
||||
" Select just-pasted text:
|
||||
nnoremap <silent> <leader>0 `[v`]
|
||||
nnoremap <silent> <leader>1 :set relativenumber!<cr>
|
||||
map <leader>m :marks<cr>
|
||||
map <leader>R :ALERename<cr>
|
||||
map <leader>v :vsplit<cr>
|
||||
map <leader>s :split<cr>
|
||||
map <leader>ab :Gblame<cr>
|
||||
map <leader>as :Gstatus<cr>
|
||||
nnoremap <leader>m :marks<cr>
|
||||
nnoremap <leader>v :vsplit<cr>
|
||||
nnoremap <leader>s :split<cr>
|
||||
" <leader>a* currently conflicts with LspCodeAction
|
||||
nnoremap <leader>ab :Gblame<cr>
|
||||
nnoremap <leader>as :Gstatus<cr>
|
||||
nnoremap <leader>ac :Commits<cr>
|
||||
nnoremap <leader>ah :GitGutterLineHighlightsToggle<cr>
|
||||
" yank filename of current buffer:
|
||||
nmap <leader>f :let @" = expand("%")<cr>
|
||||
" and into + register:
|
||||
|
@ -151,7 +150,6 @@ call deoplete#custom#option('max_list', 30)
|
|||
call deoplete#custom#option('auto_complete_delay', 25)
|
||||
call deoplete#custom#option('auto_refresh_delay', 50)
|
||||
call deoplete#custom#option('refresh_always', v:false)
|
||||
call deoplete#custom#option('prev_completion_mode', 'length')
|
||||
call deoplete#custom#option('omni_patterns', {
|
||||
\ 'go': '[^. *\t]\.\w*',
|
||||
\})
|
||||
|
@ -232,7 +230,6 @@ let g:lightline = {
|
|||
" vim-gitgutter configuration
|
||||
packadd! vim-gitgutter
|
||||
set signcolumn=yes
|
||||
nnoremap hg :GitGutterLineHighlightsToggle<cr>
|
||||
nmap ]h <Plug>(GitGutterNextHunk)
|
||||
nmap [h <Plug>(GitGutterPrevHunk)
|
||||
omap ih <Plug>(GitGutterTextObjectInnerPending)
|
||||
|
@ -255,6 +252,8 @@ packadd! echodoc.vim
|
|||
packadd! vim-fugitive
|
||||
|
||||
" vim-go
|
||||
" Doesn't work in after/ftplugin/go.vim:
|
||||
let g:go_def_mapping_enabled = 0
|
||||
" load before LSP to ensure it doesn't clobber mappings
|
||||
packadd! vim-go
|
||||
|
||||
|
@ -331,7 +330,7 @@ augroup lsp_install
|
|||
au!
|
||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
autocmd User lsp_diagnostics_updated call lightline#update()
|
||||
" autocmd BufWritePre <buffer> silent LspDocumentFormatSync
|
||||
autocmd BufWritePre *.go silent LspDocumentFormatSync
|
||||
" autocmd CursorHold <buffer> silent LspHover
|
||||
augroup END
|
||||
|
||||
|
|
Loading…
Reference in New Issue