summaryrefslogtreecommitdiff
path: root/keys
diff options
context:
space:
mode:
Diffstat (limited to 'keys')
-rw-r--r--keys/which-key.vim32
1 files changed, 29 insertions, 3 deletions
diff --git a/keys/which-key.vim b/keys/which-key.vim
index 38d972a6..5dcedce6 100644
--- a/keys/which-key.vim
+++ b/keys/which-key.vim
@@ -2,6 +2,11 @@
let @s = 'veS"'
+" Timeout
+let g:which_key_timeout = 100
+
+let g:which_key_display_names = {'<CR>': '↵', '<TAB>': '⇆'}
+
" Map leader to which_key
nnoremap <silent> <leader> :silent <c-u> :silent WhichKey '<Space>'<CR>
vnoremap <silent> <leader> :silent <c-u> :silent WhichKeyVisual '<Space>'<CR>
@@ -13,11 +18,16 @@ let g:which_key_sep = '→'
" set timeoutlen=100
" Coc Search & refactor
-nnoremap <leader>? :CocSearch <C-R>=expand("<cword>")<CR><CR>
+nnoremap <leader>? CocSearch <C-R>=expand("<cword>")<CR><CR>
let g:which_key_map['?'] = 'search word'
" Not a fan of floating windows for this
let g:which_key_use_floating_win = 0
+let g:which_key_max_size = 0
+
+" let g:which_key_position = 'botright'
+" let g:which_key_position = 'topleft'
+" let g:which_key_vertical = 1
" Change the colors if you want
@@ -32,7 +42,6 @@ let g:which_key_map['/'] = [ ':call Comment()' ,
let g:which_key_map['.'] = [ ':e $MYVIMRC' , 'open init' ]
let g:which_key_map[';'] = [ ':Commands' , 'commands' ]
let g:which_key_map['='] = [ '<C-W>=' , 'balance windows' ]
-let g:which_key_map['d'] = [ ':Bdelete' , 'delete buffer']
let g:which_key_map['e'] = [ ':CocCommand explorer --toggle --sources=file+' , 'explorer' ]
let g:which_key_map['h'] = [ '<C-W>s' , 'split below']
let g:which_key_map['n'] = [ ':let @/ = ""' , 'no highlight' ]
@@ -92,6 +101,23 @@ let g:which_key_map.b = {
\ '?' : ['Buffers' , 'fzf-buffer'],
\ }
+" d is for debug
+let g:which_key_map.d = {
+ \ 'name' : '+debug' ,
+ \ 'b' : ['<Plug>VimspectorToggleBreakpoint' , 'breakpoint'],
+ \ 'B' : ['<Plug>VimspectorToggleConditionalBreakpoint' , 'conditional breakpoint'],
+ \ 'c' : ['<Plug>VimspectorRunToCursor' , 'run to cursor'],
+ \ 'd' : ['<Plug>VimspectorContinue' , 'continue'],
+ \ 'f' : ['<Plug>VimspectorAddFunctionBreakpoint' , 'function breakpoint'],
+ \ 'm' : [':MaximizerToggle' , 'maximize window'],
+ \ 'o' : ['<Plug>VimspectorStepOver' , 'step over'],
+ \ 'O' : ['<Plug>VimspectorStepOut' , 'step out'],
+ \ 'i' : ['<Plug>VimspectorStepInto' , 'step into'],
+ \ 'p' : ['<Plug>VimspectorPause' , 'pause'],
+ \ 'r' : ['<Plug>VimspectorRestart' , 'restart'],
+ \ 's' : ['<Plug>VimspectorStop' , 'stop'],
+ \ }
+
" f is for find and replace
let g:which_key_map.f = {
\ 'name' : '+find & replace' ,
@@ -263,7 +289,7 @@ let g:which_key_map.l = {
\ 'name' : '+lsp' ,
\ '.' : [':CocConfig' , 'config'],
\ ';' : ['<Plug>(coc-refactor)' , 'refactor'],
- \ 'a' : ['<Plug>(coc-codeaction)' , 'line action'],
+ \ 'a' : ['<Plug>(coc-codeaction)' , 'code action'],
\ 'A' : ['<Plug>(coc-codeaction-selected)' , 'selected action'],
\ 'b' : [':CocNext' , 'next action'],
\ 'B' : [':CocPrev' , 'prev action'],