diff options
Diffstat (limited to 'keys/which-key.vim')
-rw-r--r-- | keys/which-key.vim | 110 |
1 files changed, 27 insertions, 83 deletions
diff --git a/keys/which-key.vim b/keys/which-key.vim index 048766a4..0b5a81bf 100644 --- a/keys/which-key.vim +++ b/keys/which-key.vim @@ -1,5 +1,4 @@ " Leader Key Maps - let @s = 'veS"' " Timeout @@ -17,10 +16,6 @@ let g:which_key_map = {} let g:which_key_sep = '→' " set timeoutlen=100 -" Coc Search & refactor -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 @@ -39,15 +34,17 @@ autocmd FileType which_key set laststatus=0 noshowmode noruler " Single mappings let g:which_key_map['/'] = [ ':call Comment()' , 'comment' ] +let g:which_key_map['?'] = [ ':NvimTreeFindFile' , '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['e'] = [ ':CocCommand explorer --toggle --sources=file+' , 'explorer' ] +let g:which_key_map['e'] = [ ':NvimTreeToggle' , 'explorer' ] let g:which_key_map['h'] = [ '<C-W>s' , 'split below'] let g:which_key_map['n'] = [ ':let @/ = ""' , 'no highlight' ] let g:which_key_map['o'] = [ ':RnvimrToggle' , 'open' ] let g:which_key_map['p'] = [ ':Files' , 'search files' ] -let g:which_key_map['q'] = [ '<Plug>(coc-fix-current)' , 'quickfix' ] +" TODO fix this +" let g:which_key_map['q'] = [ ':q' , 'quit' ] let g:which_key_map['T'] = [ ':TSHighlightCapturesUnderCursor' , 'treesitter highlight' ] let g:which_key_map['u'] = [ ':UndotreeToggle' , 'undo tree'] let g:which_key_map['v'] = [ '<C-W>v' , 'split right'] @@ -156,37 +153,7 @@ let g:which_key_map.m = { " CoC throws an error " \ 'a' : [':CocCommand bookmark.annotate', 'annotate bookmark'], -" " s is for search -" let g:which_key_map.s = { -" \ 'name' : '+search' , -" \ '/' : [':History/' , 'history'], -" \ ';' : [':Commands' , 'commands'], -" \ 'a' : [':Ag' , 'text Ag'], -" \ 'b' : [':BLines' , 'current buffer'], -" \ 'B' : [':Buffers' , 'open buffers'], -" \ 'c' : [':Commits' , 'commits'], -" \ 'C' : [':BCommits' , 'buffer commits'], -" \ 'f' : [':Files' , 'files'], -" \ 'g' : [':GFiles' , 'git files'], -" \ 'G' : [':GFiles?' , 'modified git files'], -" \ 'h' : [':History' , 'file history'], -" \ 'H' : [':History:' , 'command history'], -" \ 'l' : [':Lines' , 'lines'] , -" \ 'm' : [':Marks' , 'marks'] , -" \ 'M' : [':Maps' , 'normal maps'] , -" \ 'p' : [':Helptags' , 'help tags'] , -" \ 'P' : [':Tags' , 'project tags'], -" \ 's' : [':CocList snippets' , 'snippets'], -" \ 'S' : [':Colors' , 'color schemes'], -" \ 't' : [':Rg' , 'text Rg'], -" \ 'T' : [':BTags' , 'buffer tags'], -" \ 'w' : [':Windows' , 'search windows'], -" \ 'y' : [':Filetypes' , 'file types'], -" \ 'z' : [':FZF' , 'FZF'], -" \ } - " \ 's' : [':Snippets' , 'snippets'], -" TODO fix FZF preview or just move to Telescope " s is for search powered by telescope let g:which_key_map.s = { \ 'name' : '+search' , @@ -225,17 +192,6 @@ let g:which_key_map.s = { \ 'u' : [':Telescope colorscheme' , 'colorschemes'], \ 'z' : [':Telescope current_buffer_fuzzy_find' , 'buf_fuz_find'], \ } -" -" :CocCommand fzf-preview.AllBuffers -" :CocCommand fzf-preview.Changes -" :CocCommand fzf-preview.Yankround -" :CocCommand fzf-preview.CocReferences -" :CocCommand fzf-preview.CocDiagnostics -" :CocCommand fzf-preview.CocCurrentDiagnostics -" :CocCommand fzf-preview.CocTypeDefinitions -" \ 'l' : [':CocCommand fzf-preview.Bookmarks', 'list bookmarks'], -" $FZF_PREVIEW_PREVIEW_BAT_THEME = 'ansi-dark' -" let g:which_key_map.S = { \ 'name' : '+Session' , @@ -297,46 +253,34 @@ let g:which_key_map.G = { " l is for language server protocol let g:which_key_map.l = { \ 'name' : '+lsp' , - \ '.' : [':CocConfig' , 'config'], - \ ';' : ['<Plug>(coc-refactor)' , 'refactor'], - \ 'a' : ['<Plug>(coc-codeaction)' , 'code action'], - \ 'A' : ['<Plug>(coc-codeaction-selected)' , 'selected action'], - \ 'b' : [':CocNext' , 'next action'], - \ 'B' : [':CocPrev' , 'prev action'], - \ 'c' : [':CocList commands' , 'commands'], - \ 'd' : ['<Plug>(coc-definition)' , 'definition'], - \ 'D' : ['<Plug>(coc-declaration)' , 'declaration'], - \ 'e' : [':CocList extensions' , 'extensions'], - \ 'f' : ['<Plug>(coc-format-selected)' , 'format selected'], - \ 'F' : ['<Plug>(coc-format)' , 'format'], - \ 'h' : ['<Plug>(coc-float-hide)' , 'hide'], - \ 'i' : ['<Plug>(coc-implementation)' , 'implementation'], - \ 'I' : [':CocList diagnostics' , 'diagnostics'], - \ 'j' : ['<Plug>(coc-float-jump)' , 'float jump'], - \ 'l' : ['<Plug>(coc-codelens-action)' , 'code lens'], - \ 'n' : ['<Plug>(coc-diagnostic-next)' , 'next diagnostic'], - \ 'N' : ['<Plug>(coc-diagnostic-next-error)' , 'next error'], + \ 'a' : [':Lspsaga code_action' , 'code action'], + \ 'A' : [':Lspsaga range_code_action' , 'selected action'], + \ 'd' : [':LspDefinition' , 'definition'], + \ 'D' : [':LspDeclaration' , 'workspace_diagnostics'], + \ 'f' : [':LspFormatting' , 'format'], + \ 'h' : [':Lspsaga hover_doc' , 'hover_doc'], + \ 'H' : [':Lspsaga signature_help' , 'signature_help'], + \ 'K' : [':LspHover' , 'hover'], + \ 'i' : [':LspImplementation' , 'lsp_info'], + \ 'I' : [':LspInfo' , 'lsp_info'], + \ 'l' : [':Lspsaga lsp_finder' , 'lsp_finder'], + \ 'L' : [':Lspsaga show_line_diagnostics' , 'line_diagnostics'], + \ 'n' : [':Lspsaga diagnostic_jump_next' , 'next_diagnostic'], \ 'o' : [':Vista!!' , 'outline'], - \ 'O' : [':CocList outline' , 'search outline'], - \ 'p' : ['<Plug>(coc-diagnostic-prev)' , 'prev diagnostic'], - \ 'P' : ['<Plug>(coc-diagnostic-prev-error)' , 'prev error'], - \ 'q' : ['<Plug>(coc-fix-current)' , 'quickfix'], - \ 'r' : ['<Plug>(coc-references)' , 'references'], - \ 'R' : ['<Plug>(coc-rename)' , 'rename'], - \ 's' : [':CocList -I symbols' , 'references'], - \ 'S' : [':CocList snippets' , 'snippets'], - \ 't' : ['<Plug>(coc-type-definition)' , 'type definition'], - \ 'u' : [':CocListResume' , 'resume list'], - \ 'U' : [':CocUpdate' , 'update CoC'], - \ 'z' : [':CocDisable' , 'disable CoC'], - \ 'Z' : [':CocEnable' , 'enable CoC'], + \ 'p' : [':Lspsaga diagnostic_jump_prev' , 'prev diagnostic'], + \ 'q' : [':Lspsaga code_action' , 'quickfix'], + \ 'r' : [':LspReferences' , 'references'], + \ 'R' : [':LspRename' , 'rename'], + \ 'T' : [':LspTypeDefinition' , 'type defintion'], + \ 'x' : [':cclose' , 'close quickfix'], + \ 'y' : [':LspDocumentSymbol' , 'document symbols'], + \ 'Y' : [':LspWorkspaceSymbol' , 'workspace symbols'], \ } - " \ 'o' : ['<Plug>(coc-openlink)' , 'open link'], " t is for terminal let g:which_key_map.t = { \ 'name' : '+terminal' , - \ ';' : [':FloatermNew --wintype=normal --height=6' , 'terminal'], + \ ';' : [':FloatermNew --wintype=normal --height=6' , 'terminal'], \ 'f' : [':FloatermNew fzf' , 'fzf'], \ 'g' : [':FloatermNew lazygit' , 'git'], \ 'd' : [':FloatermNew lazydocker' , 'docker'], @@ -347,7 +291,7 @@ let g:which_key_map.t = { \ 'r' : [':FloatermNew ranger' , 'ranger'], \ 't' : [':FloatermToggle' , 'toggle'], \ 'y' : [':FloatermNew ytop' , 'ytop'], - \ 's' : [':FloatermNew ncdu' , 'ncdu'], + \ 'u' : [':FloatermNew ncdu' , 'ncdu'], \ } " w is for wiki |