Update vim and gitconfig
This commit is contained in:
parent
94c7988c84
commit
69061dfe7f
|
@ -25,6 +25,7 @@
|
||||||
rr = !git reset --hard $(git rb)
|
rr = !git reset --hard $(git rb)
|
||||||
shp = show -p
|
shp = show -p
|
||||||
s = status
|
s = status
|
||||||
|
ss = stash save
|
||||||
st = status
|
st = status
|
||||||
undo = reset --soft HEAD^
|
undo = reset --soft HEAD^
|
||||||
[user]
|
[user]
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
nmap <leader>gb :up<bar>:GoBuild<cr>
|
nmap <silent> <leader>gb :up<bar>:GoBuild<cr>
|
||||||
nmap <leader>gr :GoRun<cr>
|
nmap <silent> <leader>gr :up<bar>:GoRun<cr>
|
||||||
nmap <leader>gc :GoCallers<cr>
|
nmap <silent> <leader>gc :GoCallers<cr>
|
||||||
nmap <leader>gi :GoImplements<cr>
|
" TODO: if GoInfo returns nothing an [INFO] SUCCESS message is shown.
|
||||||
nmap <leader>^ :GoAlternate<cr>
|
" But disabling g:go_echo_command_info impacts build and test workflow.
|
||||||
nmap <leader>gk :GoDocBrowser<cr>
|
nmap <silent> <leader>gi :GoInfo<cr>
|
||||||
nmap <leader>gd :GoDecls<cr>
|
nmap <silent> <leader>gp :GoImplements<cr>
|
||||||
nmap <leader>gD :GoDeclsDir<cr>
|
nmap <silent> <leader>ga :GoAlternate<cr>
|
||||||
|
nmap <silent> <leader>gk :GoDocBrowser<cr>
|
||||||
|
nmap <silent> <leader>gd :GoDecls<cr>
|
||||||
|
nmap <silent> <leader>gD :GoDeclsDir<cr>
|
||||||
" mnemonic: match
|
" mnemonic: match
|
||||||
nmap <leader>gm :GoSameIds<cr>
|
nmap <silent> <leader>gm :GoSameIds<cr>
|
||||||
|
|
||||||
nmap <leader>gv <esc>:vsplit<bar>:GoAlternate!<cr>
|
nmap <silent> <leader>gv <esc>:vsplit<bar>:GoAlternate!<cr>
|
||||||
nmap <leader>gs <esc>:split<bar>:GoAlternate!<cr>
|
nmap <silent> <leader>gs <esc>:split<bar>:GoAlternate!<cr>
|
||||||
nmap <leader>gt <esc>:up<bar>:GoTest<cr>
|
nmap <silent> <leader>gt <esc>:up<bar>:GoTest<cr>
|
||||||
nmap <leader>gf <esc>:up<bar>:GoTestFunc<cr>
|
nmap <silent> <leader>gf <esc>:up<bar>:GoTestFunc<cr>
|
||||||
nmap <leader>gat <esc>:GoAddTags<cr>
|
nmap <silent> <leader>gat <esc>:GoAddTags<cr>
|
||||||
nmap <leader>grt <esc>:GoRemoveTags<cr>
|
nmap <silent> <leader>grt <esc>:GoRemoveTags<cr>
|
||||||
nmap <leader>gec <esc>:up<bar>:GoErrCheck<cr>
|
nmap <silent> <leader>gec <esc>:up<bar>:GoErrCheck<cr>
|
||||||
nmap <leader>gie :GoIfErr<cr>
|
|
||||||
|
|
||||||
nnoremap <silent> dr :GoDebugBreakpoint<cr>
|
nnoremap <silent> dr :GoDebugBreakpoint<cr>
|
||||||
nnoremap <silent> d! :GoDebugStart<cr>
|
nnoremap <silent> d! :GoDebugStart<cr>
|
||||||
|
@ -25,10 +27,13 @@ nnoremap <silent> dq :GoDebugStop<cr>
|
||||||
nnoremap <silent> dn :GoDebugNext<cr>
|
nnoremap <silent> dn :GoDebugNext<cr>
|
||||||
nnoremap <silent> ds :GoDebugStep<cr>
|
nnoremap <silent> ds :GoDebugStep<cr>
|
||||||
|
|
||||||
|
" Avoid window positions jumping around when building and testing:
|
||||||
|
set cmdheight=2
|
||||||
|
|
||||||
" fzf configuration:
|
" fzf configuration:
|
||||||
let g:fzf_action = {
|
let g:fzf_action = {
|
||||||
\ 'ctrl-t': 'tab split',
|
\ 'ctrl-t': 'tab split',
|
||||||
\ 'ctrl-x': 'split',
|
\ 'ctrl-s': 'split',
|
||||||
\ 'ctrl-v': 'vsplit' }
|
\ 'ctrl-v': 'vsplit' }
|
||||||
|
|
||||||
" Vim-Go configuration:
|
" Vim-Go configuration:
|
||||||
|
@ -39,6 +44,10 @@ let g:go_imports_autosave = 1
|
||||||
let g:go_auto_sameids = 0
|
let g:go_auto_sameids = 0
|
||||||
let g:go_auto_type_info = 0
|
let g:go_auto_type_info = 0
|
||||||
let g:go_info_mode = 'gopls'
|
let g:go_info_mode = 'gopls'
|
||||||
|
" ALE handles this:
|
||||||
|
let g:go_auto_type_info = 0
|
||||||
|
let g:go_echo_command_info = 1
|
||||||
|
let g:go_echo_go_info = 0
|
||||||
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
|
||||||
|
|
17
vimrc
17
vimrc
|
@ -93,7 +93,7 @@ augroup vimrc
|
||||||
autocmd InsertEnter * set cul
|
autocmd InsertEnter * set cul
|
||||||
autocmd InsertLeavePre * set nocul
|
autocmd InsertLeavePre * set nocul
|
||||||
" use tabs in .gitconfig
|
" use tabs in .gitconfig
|
||||||
autocmd FileType gitconfig setlocal shiftwidth=2 tabstop=2 noexpandtab
|
autocmd BufEnter .gitconfig setlocal shiftwidth=2 tabstop=2 noexpandtab
|
||||||
augroup end
|
augroup end
|
||||||
|
|
||||||
" But, don't remember the current directory for a given file:
|
" But, don't remember the current directory for a given file:
|
||||||
|
@ -186,15 +186,6 @@ let g:echodoc#enable_at_startup = 1
|
||||||
packadd! echodoc.vim
|
packadd! echodoc.vim
|
||||||
|
|
||||||
" ALE configuration:
|
" ALE configuration:
|
||||||
function SymbolSearch()
|
|
||||||
call inputsave()
|
|
||||||
let s:pattern = trim(input('symbol search: '))
|
|
||||||
call inputrestore()
|
|
||||||
if len(s:pattern) > 0
|
|
||||||
execute 'ALESymbolSearch' s:pattern
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
map <Leader>ss :call SymbolSearch()<CR>
|
|
||||||
nmap [L <Plug>(ale_first)
|
nmap [L <Plug>(ale_first)
|
||||||
nmap ]L <Plug(ale_last)
|
nmap ]L <Plug(ale_last)
|
||||||
nmap [e <Plug>(ale_previous_wrap_error)
|
nmap [e <Plug>(ale_previous_wrap_error)
|
||||||
|
@ -223,6 +214,7 @@ let g:ale_lint_on_insert_leave = 1
|
||||||
let g:ale_lint_on_save = 1
|
let g:ale_lint_on_save = 1
|
||||||
let g:ale_echo_cursor = 1
|
let g:ale_echo_cursor = 1
|
||||||
let g:ale_lint_delay = 100
|
let g:ale_lint_delay = 100
|
||||||
|
let g:ale_lsp_suggestions = 1
|
||||||
let g:ale_set_balloons = 1
|
let g:ale_set_balloons = 1
|
||||||
" NOTE: Needs https://github.com/dense-analysis/ale/issues/3350
|
" NOTE: Needs https://github.com/dense-analysis/ale/issues/3350
|
||||||
let g:ale_rust_analyzer_config = {
|
let g:ale_rust_analyzer_config = {
|
||||||
|
@ -242,8 +234,7 @@ let g:ale_go_gopls_init_options = {'ui.diagnostic.analyses': {
|
||||||
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
|
||||||
let g:ale_hover_to_preview = 1
|
let g:ale_hover_to_preview = 1
|
||||||
let g:ale_sign_column_always = 1
|
let g:ale_history_log_output = 0
|
||||||
let g:ale_history_log_output = 1
|
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'javascript': ['eslint'],
|
\ 'javascript': ['eslint'],
|
||||||
\ 'go': ['gopls'],
|
\ 'go': ['gopls'],
|
||||||
|
@ -280,3 +271,5 @@ packadd! fzf.vim
|
||||||
packadd! vim-go
|
packadd! vim-go
|
||||||
packadd! vim-surround
|
packadd! vim-surround
|
||||||
packadd! vim-yaml-folds
|
packadd! vim-yaml-folds
|
||||||
|
packadd! splitjoin.vim
|
||||||
|
packadd! vim-fugitive
|
||||||
|
|
Loading…
Reference in New Issue