summaryrefslogtreecommitdiff
path: root/.config/nvim/vim-script
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-05-01 14:26:11 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-05-01 14:26:11 +0200
commitd2fc21ae088e0c078c39f7fb9f313b808e7e90b7 (patch)
tree443371c080af2a5ffca5c87799c0cd6f97948252 /.config/nvim/vim-script
parent296b2245da8fda7c96080e96e238f97839e74411 (diff)
Removed bloat, added some sweet features, synced with Lunarvim repo
Diffstat (limited to '.config/nvim/vim-script')
-rw-r--r--.config/nvim/vim-script/_whichkey/init.vim140
1 files changed, 0 insertions, 140 deletions
diff --git a/.config/nvim/vim-script/_whichkey/init.vim b/.config/nvim/vim-script/_whichkey/init.vim
deleted file mode 100644
index eb52b82..0000000
--- a/.config/nvim/vim-script/_whichkey/init.vim
+++ /dev/null
@@ -1,140 +0,0 @@
-" Leader Key Maps
-
-" Timeout
-let g:which_key_timeout = 100
-
-let g:which_key_display_names = {'<CR>': '↵', '<TAB>': '⇆', " ": 'SPC'}
-
-" 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>
-
-let g:which_key_map = {}
-let g:which_key_sep = '→'
-
-" Not a fan of floating windows for this
-let g:which_key_use_floating_win = 0
-let g:which_key_max_size = 0
-
-" Hide status line
-autocmd! FileType which_key
-autocmd FileType which_key set laststatus=0 noshowmode noruler
- \| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler
-
-" let g:which_key_map['/'] = 'comment toggle'
-let g:which_key_map[';'] = [ ':Dashboard' , 'home screen' ]
-let g:which_key_map['?'] = [ ':NvimTreeFindFile' , 'find current file' ]
-let g:which_key_map['e'] = [ ':NvimTreeToggle' , 'explorer' ]
-let g:which_key_map['f'] = [ ':Telescope find_files' , 'find files' ]
-let g:which_key_map['h'] = [ '<C-W>s' , 'split below']
-let g:which_key_map['H'] = [ ':let @/ = ""' , 'no highlight' ]
-let g:which_key_map['r'] = [ ':RnvimrToggle' , 'ranger' ]
-" TODO create entire treesitter section
-let g:which_key_map['v'] = [ '<C-W>v' , 'split right']
-" TODO play nice with status line
-
-" Group mappings
-
-" b is for buffer
-let g:which_key_map.b = {
- \ 'name' : '+buffer' ,
- \ '>' : [':BufferMoveNext' , 'move next'],
- \ '<' : [':BufferMovePrevious' , 'move prev'],
- \ 'b' : [':BufferPick' , 'pick buffer'],
- \ 'd' : [':BufferClose' , 'delete-buffer'],
- \ 'n' : ['bnext' , 'next-buffer'],
- \ 'p' : ['bprevious' , 'previous-buffer'],
- \ '?' : ['Buffers' , 'fzf-buffer'],
- \ }
-
-" d is for debug
-let g:which_key_map.d = {
- \ 'name' : '+debug' ,
- \ 'b' : ['DebugToggleBreakpoint ' , 'toggle breakpoint'],
- \ 'c' : ['DebugContinue' , 'continue'],
- \ 'i' : ['DebugStepInto' , 'step into'],
- \ 'o' : ['DebugStepOver' , 'step over'],
- \ 'r' : ['DebugToggleRepl' , 'toggle repl'],
- \ 's' : ['DebugStart' , 'start'],
- \ }
-
-" F is for fold
-let g:which_key_map.F = {
- \ 'name': '+fold',
- \ 'O' : [':set foldlevel=20' , 'open all'],
- \ 'C' : [':set foldlevel=0' , 'close all'],
- \ 'c' : [':foldclose' , 'close'],
- \ 'o' : [':foldopen' , 'open'],
- \ '1' : [':set foldlevel=1' , 'level1'],
- \ '2' : [':set foldlevel=2' , 'level2'],
- \ '3' : [':set foldlevel=3' , 'level3'],
- \ '4' : [':set foldlevel=4' , 'level4'],
- \ '5' : [':set foldlevel=5' , 'level5'],
- \ '6' : [':set foldlevel=6' , 'level6']
- \ }
-
-" s is for search powered by telescope
-let g:which_key_map.s = {
- \ 'name' : '+search' ,
- \ '.' : [':Telescope filetypes' , 'filetypes'],
- \ 'B' : [':Telescope git_branches' , 'git branches'],
- \ 'd' : [':Telescope lsp_document_diagnostics' , 'document_diagnostics'],
- \ 'D' : [':Telescope lsp_workspace_diagnostics' , 'workspace_diagnostics'],
- \ 'f' : [':Telescope find_files' , 'files'],
- \ 'h' : [':Telescope command_history' , 'history'],
- \ 'i' : [':Telescope media_files' , 'media files'],
- \ 'm' : [':Telescope marks' , 'marks'],
- \ 'M' : [':Telescope man_pages' , 'man_pages'],
- \ 'o' : [':Telescope vim_options' , 'vim_options'],
- \ 't' : [':Telescope live_grep' , 'text'],
- \ 'r' : [':Telescope registers' , 'registers'],
- \ 'w' : [':Telescope file_browser' , 'buf_fuz_find'],
- \ 'u' : [':Telescope colorscheme' , 'colorschemes'],
- \ }
-
-" S is for Session
-let g:which_key_map.S = {
- \ 'name' : '+Session' ,
- \ 's' : [':SessionSave' , 'save session'],
- \ 'l' : [':SessionLoad' , 'load Session'],
- \ }
-
-" g is for git
-let g:which_key_map.g = {
- \ 'name' : '+git' ,
- \ 'b' : [':GitBlameToggle' , 'blame'],
- \ 'B' : [':GBrowse' , 'browse'],
- \ 'd' : [':Git diff' , 'diff'],
- \ 'j' : [':NextHunk' , 'next hunk'],
- \ 'k' : [':PrevHunk' , 'prev hunk'],
- \ 'l' : [':Git log' , 'log'],
- \ 'p' : [':PreviewHunk' , 'preview hunk'],
- \ 'r' : [':ResetHunk' , 'reset hunk'],
- \ 'R' : [':ResetBuffer' , 'reset buffer'],
- \ 's' : [':StageHunk' , 'stage hunk'],
- \ 'S' : [':Gstatus' , 'status'],
- \ 'u' : [':UndoStageHunk' , 'undo stage hunk'],
- \ }
-
-" l is for language server protocol
-let g:which_key_map.l = {
- \ 'name' : '+lsp' ,
- \ 'a' : [':Lspsaga code_action' , 'code action'],
- \ 'A' : [':Lspsaga range_code_action' , 'selected action'],
- \ 'd' : [':Telescope lsp_document_diagnostics' , 'document diagnostics'],
- \ 'D' : [':Telescope lsp_workspace_diagnostics', 'workspace diagnostics'],
- \ 'f' : [':LspFormatting' , 'format'],
- \ 'I' : [':LspInfo' , 'lsp info'],
- \ 'v' : [':LspVirtualTextToggle' , 'lsp toggle virtual text'],
- \ 'l' : [':Lspsaga lsp_finder' , 'lsp finder'],
- \ 'L' : [':Lspsaga show_line_diagnostics' , 'line_diagnostics'],
- \ 'p' : [':Lspsaga preview_definition' , 'preview definition'],
- \ 'q' : [':Telescope quickfix' , 'quickfix'],
- \ 'r' : [':Lspsaga rename' , 'rename'],
- \ 'T' : [':LspTypeDefinition' , 'type defintion'],
- \ 'x' : [':cclose' , 'close quickfix'],
- \ 's' : [':Telescope lsp_document_symbols' , 'document symbols'],
- \ 'S' : [':Telescope lsp_workspace_symbols' , 'workspace symbols'],
- \ }
-
-call which_key#register('<Space>', "g:which_key_map")