diff options
Diffstat (limited to 'vimscript')
| -rw-r--r-- | vimscript/functions.vim | 54 | ||||
| -rw-r--r-- | vimscript/lv-vscode/init.vim (renamed from vimscript/nv-vscode/init.vim) | 10 | ||||
| -rw-r--r-- | vimscript/lv-whichkey/init.vim (renamed from vimscript/nv-whichkey/init.vim) | 102 | 
3 files changed, 30 insertions, 136 deletions
| diff --git a/vimscript/functions.vim b/vimscript/functions.vim index c1905971..78da3589 100644 --- a/vimscript/functions.vim +++ b/vimscript/functions.vim @@ -1,28 +1,28 @@ -command! LspCodeAction lua require 'nv-utils'.code_action() -command! LspDeclaration lua require 'nv-utils'.declaration() -command! LspDefinition lua require 'nv-utils'.definition() -command! LspDocumentSymbol lua require 'nv-utils'.document_symbol() -command! LspFormatting lua require 'nv-utils'.formatting() -command! LspFormattingSync lua require 'nv-utils'.formatting_sync() -command! LspHover lua require 'nv-utils'.hover() -command! LspImplementation lua require 'nv-utils'.implementation() -command! LspRangeCodeAction lua require 'nv-utils'.range_code_action() -command! LspRangeFormatting lua require 'nv-utils'.range_formatting() -command! LspReferences lua require 'nv-utils'.references() -command! LspRename lua require 'nv-utils'.rename() -command! LspTypeDefinition lua require 'nv-utils'.type_definition() -command! LspWorkspaceSymbol lua require 'nv-utils'.workspace_symbol() -command! LspGotoNext lua require 'nv-utils'.goto_next() -command! LspGotoPrev lua require 'nv-utils'.goto_prev() -command! LspShowLineDiagnostics lua require 'nv-utils'.show_line_diagnostics() -command! NextHunk lua require 'nv-utils'.next_hunk() -command! PrevHunk lua require 'nv-utils'.prev_hunk() -command! StageHunk lua require 'nv-utils'.stage_hunk() -command! UndoStageHunk lua require 'nv-utils'.undo_stage_hunk() -command! ResetHunk lua require 'nv-utils'.reset_hunk() -command! ResetBuffer lua require 'nv-utils'.reset_buffer() -command! PreviewHunk lua require 'nv-utils'.preview_hunk() -command! BlameLine lua require 'nv-utils'.blame_line() +command! LspCodeAction lua require 'lv-utils'.code_action() +command! LspDeclaration lua require 'lv-utils'.declaration() +command! LspDefinition lua require 'lv-utils'.definition() +command! LspDocumentSymbol lua require 'lv-utils'.document_symbol() +command! LspFormatting lua require 'lv-utils'.formatting() +command! LspFormattingSync lua require 'lv-utils'.formatting_sync() +command! LspHover lua require 'lv-utils'.hover() +command! LspImplementation lua require 'lv-utils'.implementation() +command! LspRangeCodeAction lua require 'lv-utils'.range_code_action() +command! LspRangeFormatting lua require 'lv-utils'.range_formatting() +command! LspReferences lua require 'lv-utils'.references() +command! LspRename lua require 'lv-utils'.rename() +command! LspTypeDefinition lua require 'lv-utils'.type_definition() +command! LspWorkspaceSymbol lua require 'lv-utils'.workspace_symbol() +command! LspGotoNext lua require 'lv-utils'.goto_next() +command! LspGotoPrev lua require 'lv-utils'.goto_prev() +command! LspShowLineDiagnostics lua require 'lv-utils'.show_line_diagnostics() +command! NextHunk lua require 'lv-utils'.next_hunk() +command! PrevHunk lua require 'lv-utils'.prev_hunk() +command! StageHunk lua require 'lv-utils'.stage_hunk() +command! UndoStageHunk lua require 'lv-utils'.undo_stage_hunk() +command! ResetHunk lua require 'lv-utils'.reset_hunk() +command! ResetBuffer lua require 'lv-utils'.reset_buffer() +command! PreviewHunk lua require 'lv-utils'.preview_hunk() +command! BlameLine lua require 'lv-utils'.blame_line()  command! W noa w  " Debugging @@ -55,10 +55,6 @@ command! DebugGetSession lua require'dap'.session()  " nnoremap <silent> <leader>dr :lua require'dap'.repl.open()<CR>  " nnoremap <silent> <leader>dl :lua require'dap'.run_last()<CR> -" TODO find out why this thing follows me everywhere in java -let blacklist = ['java'] -autocmd CursorHold,CursorHoldI * if index(blacklist, &ft) < 0 | lua require'nvim-lightbulb'.update_lightbulb() -  autocmd! User GoyoEnter lua require('gitsigns').toggle_signs()  autocmd! User GoyoLeave lua require('gitsigns').toggle_signs() diff --git a/vimscript/nv-vscode/init.vim b/vimscript/lv-vscode/init.vim index a10afc97..e3e7f6eb 100644 --- a/vimscript/nv-vscode/init.vim +++ b/vimscript/lv-vscode/init.vim @@ -1,14 +1,14 @@  " TODO there is a more contemporary version of this file  " TODO Also some of it is redundant -packadd quickscope +" packadd quickscope  luafile ~/.config/nvim/lua/settings.lua -let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] +" let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] -highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline -highlight QuickScopeSecondary guifg='#eF5F70' gui=underline ctermfg=81 cterm=underline -let g:qs_max_chars=150 +" highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline +" highlight QuickScopeSecondary guifg='#eF5F70' gui=underline ctermfg=81 cterm=underline +" let g:qs_max_chars=150  "VSCode  function! s:split(...) abort diff --git a/vimscript/nv-whichkey/init.vim b/vimscript/lv-whichkey/init.vim index cd5f255f..2d2b4441 100644 --- a/vimscript/nv-whichkey/init.vim +++ b/vimscript/lv-whichkey/init.vim @@ -23,60 +23,18 @@ autocmd  FileType which_key set laststatus=0 noshowmode noruler  let g:which_key_map['/'] = 'comment toggle'  let g:which_key_map[';'] = [ ':Dashboard'                                      , 'home screen' ] -let g:which_key_map[','] = [ '<Plug>(emmet-expand-abbr)'                       , 'expand tags' ] -let g:which_key_map['"'] = [ '<Plug>PeekupOpen'                                , 'registers' ]  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['M'] = [ ':MarkdownPreviewToggle'                          , 'markdown preview']  let g:which_key_map['H'] = [ ':let @/ = ""'                                    , 'no highlight' ]  let g:which_key_map['r'] = [ ':RnvimrToggle'                                   , 'ranger' ] -let g:which_key_map['*'] = [ ':DogeGenerate'                                   , 'documentation generator' ] -let g:which_key_map['u'] = [ ':UndotreeToggle'                                 , 'undo tree' ]  " TODO create entire treesitter section -let g:which_key_map['T'] = [ ':TSHighlightCapturesUnderCursor'                 , 'treesitter highlight' ]  let g:which_key_map['v'] = [ '<C-W>v'                                          , 'split right']  " TODO play nice with status line -let g:which_key_map['z'] = [ 'Goyo'                                            , 'zen' ]  " Group mappings -" . is for emmet -let g:which_key_map['.'] = { -      \ 'name' : '+emmet' , -      \ ',' : ['<Plug>(emmet-expand-abbr)'               , 'expand abbr'], -      \ ';' : ['<plug>(emmet-expand-word)'               , 'expand word'], -      \ 'u' : ['<plug>(emmet-update-tag)'                , 'update tag'], -      \ 'd' : ['<plug>(emmet-balance-tag-inward)'        , 'balance tag in'], -      \ 'D' : ['<plug>(emmet-balance-tag-outward)'       , 'balance tag out'], -      \ 'n' : ['<plug>(emmet-move-next)'                 , 'move next'], -      \ 'N' : ['<plug>(emmet-move-prev)'                 , 'move prev'], -      \ 'i' : ['<plug>(emmet-image-size)'                , 'image size'], -      \ '/' : ['<plug>(emmet-toggle-comment)'            , 'toggle comment'], -      \ 'j' : ['<plug>(emmet-split-join-tag)'            , 'split join tag'], -      \ 'k' : ['<plug>(emmet-remove-tag)'                , 'remove tag'], -      \ 'a' : ['<plug>(emmet-anchorize-url)'             , 'anchorize url'], -      \ 'A' : ['<plug>(emmet-anchorize-summary)'         , 'anchorize summary'], -      \ 'm' : ['<plug>(emmet-merge-lines)'               , 'merge lines'], -      \ 'c' : ['<plug>(emmet-code-pretty)'               , 'code pretty'], -      \ } - -" a is for actions -let g:which_key_map.a = { -      \ 'name' : '+actions' , -      \ 'c' : [':ColorizerToggle'        , 'colorizer'], -      \ 'h' : [':let @/ = ""'            , 'remove search highlight'], -      \ 'i' : [':IndentBlanklineToggle'  , 'toggle indent lines'], -      \ 'n' : [':set nonumber!'          , 'line-numbers'], -      \ 's' : [':s/\%V\(.*\)\%V/"\1"/'   , 'surround'], -      \ 'r' : [':set norelativenumber!'  , 'relative line nums'], -      \ 'v' : [':Codi'                   , 'virtual repl on'], -      \ 'V' : [':Codi!'                  , 'virtual repl off'], -      \ } -      " \ 'l' : [':Bracey'                 , 'start live server'], -      " \ 'L' : [':BraceyStop'             , 'stop live server'], -  " b is for buffer  let g:which_key_map.b = {        \ 'name' : '+buffer' , @@ -99,17 +57,6 @@ let g:which_key_map.d = {        \ 'r' : ['DebugToggleRepl'               , 'toggle repl'],        \ 's' : ['DebugStart'                    , 'start'],        \ } -      " \ 'O' : ['DebugStepOut'                  , 'next-buffer'], -      " \ 'S' : ['DebugGetSession '              , 'fzf-buffer'], - -" D is for database -let g:which_key_map.D = { -      \ 'name' : '+database' , -      \ 'u' : ['DBUIToggle '        , 'db ui toggle'], -      \ 'f' : ['DBUIFindBuffer'     , 'db find buffer'], -      \ 'r' : ['DBUIRenameBuffer'   , 'db rename buffer'], -      \ 'l' : ['DBUILastQueryInfo'  , 'db last query'], -      \ }  " F is for fold  let g:which_key_map.F = { @@ -126,15 +73,6 @@ let g:which_key_map.F = {      \ '6' : [':set foldlevel=6'   , 'level6']      \ } -" m is for mark -" I'd rather use regular marks but they never clear -let g:which_key_map.m = { -\ 'name': '+mark', -    \ 't' : [':BookmarkToggle'   , 'toggle'], -    \ 'j' : [':BookmarkNext'   , 'next mark'], -    \ 'k' : [':BookmarkPrev'   , 'prev mark'] -    \ } -  " s is for search powered by telescope  let g:which_key_map.s = {        \ 'name' : '+search' , @@ -177,21 +115,6 @@ let g:which_key_map.g = {        \ 'S' : [':Gstatus'                          , 'status'],        \ 'u' : [':UndoStageHunk'                    , 'undo stage hunk'],        \ } -      " \ 'n' : [':Neogit'                           , 'neogit'], - -" G is for gist -let g:which_key_map.G = { -      \ 'name' : '+gist' , -      \ 'b' : [':Gist -b'                          , 'post gist browser'], -      \ 'd' : [':Gist -d'                          , 'delete gist'], -      \ 'e' : [':Gist -e'                          , 'edit gist'], -      \ 'l' : [':Gist -l'                          , 'list public gists'], -      \ 's' : [':Gist -ls'                         , 'list starred gists'], -      \ 'm' : [':Gist -m'                          , 'post gist all buffers'], -      \ 'p' : [':Gist -P'                          , 'post public gist '], -      \ 'P' : [':Gist -p'                          , 'post private gist '], -      \ } -      " \ 'a' : [':Gist -a'                          , 'post gist anon'],  " l is for language server protocol  let g:which_key_map.l = { @@ -213,30 +136,5 @@ let g:which_key_map.l = {        \ 's' : [':Telescope lsp_document_symbols'     , 'document symbols'],        \ 'S' : [':Telescope lsp_workspace_symbols'    , 'workspace symbols'],        \ } -      " \ 'H' : [':Lspsaga signature_help'             , 'signature_help'], -      " \ 'o' : [':Vista!!'                            , 'outline'], - -" t is for terminal -let g:which_key_map.t = { -      \ 'name' : '+terminal' , -      \ ';' : [':FloatermNew --wintype=normal --height=6'       , 'terminal'], -      \ 'f' : [':FloatermNew fzf'                               , 'fzf'], -      \ 'g' : [':FloatermNew lazygit'                           , 'git'], -      \ 'd' : [':FloatermNew lazydocker'                        , 'docker'], -      \ 'n' : [':FloatermNew node'                              , 'node'], -      \ 'N' : [':FloatermNew nnn'                               , 'nnn'], -      \ 'p' : [':FloatermNew python'                            , 'python'], -      \ 'm' : [':FloatermNew lazynpm'                           , 'npm'], -      \ 't' : [':FloatermToggle'                                , 'toggle'], -      \ 'y' : [':FloatermNew ytop'                              , 'ytop'], -      \ 'u' : [':FloatermNew ncdu'                              , 'ncdu'], -      \ } -      " \ 'r' : [':FloatermNew ranger'                            , 'ranger'], - -" let g:which_key_map.R = { -"       \ 'name' : '+Find_Replace' , -"       \ 'f' : [':Farr --source=vimgrep'    , 'file'], -"       \ 'p' : [':Farr --source=rgnvim'     , 'project'], -"       \ }  call which_key#register('<Space>', "g:which_key_map") | 
