nvim: add leap.nvim

This commit is contained in:
dogeystamp 2023-04-12 18:19:11 -04:00
parent e3a77a5ac0
commit 1100fc0755
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 20 additions and 4 deletions

View File

@ -9,6 +9,8 @@ set shell=/bin/sh
hi Search cterm=NONE ctermfg=white ctermbg=blue
hi StatusLine ctermbg=NONE cterm=italic
hi SignColumn ctermbg=NONE
autocmd InsertEnter * hi StatusLine cterm=bold
autocmd InsertLeave * hi StatusLine cterm=italic
@ -156,16 +158,19 @@ if has('python3')
let g:UltiSnipsJumpForwardTrigger="<c-m>"
let g:UltiSnipsJumpBackwardTrigger="<c-b>"
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/']
" my devices without python3 probably don't need these
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/completion-nvim'
Plug 'nvim-lua/lsp-status.nvim'
Plug 'stevearc/dressing.nvim'
endif
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'axieax/urlview.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/completion-nvim'
Plug 'nvim-lua/lsp-status.nvim'
Plug 'stevearc/dressing.nvim'
Plug 'ggandor/leap.nvim'
call plug#end()

View File

@ -86,3 +86,14 @@ require('dressing').setup({
insert_only = false,
}
})
-- fancy motions (leap.nvim)
vim.keymap.set({'n', 'x', 'o'}, 'f', '<Plug>(leap-forward-to)')
vim.keymap.set({'n', 'x', 'o'}, 'F', '<Plug>(leap-backward-to)')
require('leap').opts.safe_labels = {
"a", "s", "d", "f", "g", "h", "j", "k", "l"
}
require('leap').opts.labels = { "a", "s", "d",
"f", "k", "l", "h", "o", "d", "w", "e", "m", "b",
"u", "y", "v", "r", "g", "t", "c", "x", "/", "z",
}