Bläddra i källkod

add bookmark plugin since regular marks never delete for me

Chris 4 år sedan
förälder
incheckning
7a67d6245a
5 ändrade filer med 20 tillägg och 3 borttagningar
  1. 2 2
      README.md
  2. 2 0
      init.lua
  3. 2 0
      lua/nv-bookmark/init.lua
  4. 3 0
      lua/plugins.lua
  5. 11 1
      vimscript/nv-whichkey/init.vim

+ 2 - 2
README.md

@@ -61,7 +61,7 @@ $HOME/.config/nvim/vimscript/nv-vscode/init.vim
     ```bash
     sudo pacman -S xsel
     ```
-    
+
 - WSL2
 
     Make sure ~/bin is in your path in this case.
@@ -176,13 +176,13 @@ features when I have time
 - look into emmet-ls
 - toggle virtual text diagnostics
 - configure neogit
-- configure kshenoy/vim-signature
 - vim ult test
 - what is `fzy`
 - https://github.com/pwntester/octo.nvim
 - configure surround
 - maybe incorporate ultisnips
 - switch back to `nvim-autopairs` when/if it doesn't break snippets 
+- Implement this for typescript https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils
 
 **PLUGIN BUGS**
 

+ 2 - 0
init.lua

@@ -34,6 +34,7 @@ require('nv-dial')
 require('nv-nvim-dap')
 require('nv-lightbulb')
 require('nv-indentline')
+require('nv-bookmark')
 -- require('nv-lspinstall')
 
 -- Which Key (Hope to replace with Lua plugin someday)
@@ -56,3 +57,4 @@ require('lsp.docker-ls')
 require('lsp.html-ls')
 require('lsp.efm-general-ls')
 require('lsp.virtual_text')
+

+ 2 - 0
lua/nv-bookmark/init.lua

@@ -0,0 +1,2 @@
+vim.g.bookmark_no_default_key_mappings = 1
+vim.g.bookmark_sign = ''

+ 3 - 0
lua/plugins.lua

@@ -117,6 +117,9 @@ return require('packer').startup(function(use)
     use 'junegunn/goyo.vim'
     use 'andymass/vim-matchup'
     use 'cohama/lexima.vim'
+    use 'MattesGroeger/vim-bookmarks'
+    -- use 'kshenoy/vim-signature'
+    -- use 'nelstrom/vim-visual-star-search'
 	-- TODO switch back when config support snips
     -- use 'windwp/nvim-autopairs'
 

+ 11 - 1
vimscript/nv-whichkey/init.vim

@@ -28,7 +28,7 @@ let g:which_key_map['?'] = [ ':NvimTreeFindFile'                               ,
 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['M'] = [ ':MarkdownPreviewToggle'                          , 'markdown preview']
 let g:which_key_map['h'] = [ ':let @/ = ""'                                    , 'no highlight' ]
 let g:which_key_map['r'] = [ ':RnvimrToggle'                                   , 'ranger' ]
 " TODO create entire treesitter section
@@ -114,6 +114,15 @@ 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': '+fold',
+    \ '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' ,
@@ -133,6 +142,7 @@ let g:which_key_map.s = {
       \ 'u' : [':Telescope colorscheme'                 , 'colorschemes'],
       \ }
 
+" S is for Session
 let g:which_key_map.S = {
       \ 'name' : '+Session' ,
       \ 's' : [':SessionSave'           , 'save session'],