nvim: after/plugin/vsnip: Keymap settings are not required anymore
With the move to nvim-cmp these vsnip key mappings are not required anymore. The completion and expansion gets taken care of by nvim-cmp. Just move the vsnip_filetypes settings to init.
This commit is contained in:
parent
b6063211f7
commit
9de5a7de76
2 changed files with 6 additions and 19 deletions
|
@ -1,19 +0,0 @@
|
|||
" Expand
|
||||
imap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
|
||||
smap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
|
||||
|
||||
" Expand or jump
|
||||
imap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
|
||||
smap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
|
||||
|
||||
" Select or cut text to use as $TM_SELECTED_TEXT in the next snippet.
|
||||
" See https://github.com/hrsh7th/vim-vsnip/pull/50
|
||||
nmap <LocalLeader>s <Plug>(vsnip-select-text)
|
||||
xmap <LocalLeader>s <Plug>(vsnip-select-text)
|
||||
nmap <LocalLeader>S <Plug>(vsnip-cut-text)
|
||||
xmap <LocalLeader>S <Plug>(vsnip-cut-text)
|
||||
|
||||
" If you want to use snippet for multiple filetypes, you can `g:vsnip_filetypes` for it.
|
||||
let g:vsnip_filetypes = {}
|
||||
let g:vsnip_filetypes.javascriptreact = ['javascript']
|
||||
let g:vsnip_filetypes.typescriptreact = ['typescript']
|
|
@ -89,6 +89,12 @@ vim.g.toggle_list_no_mappings = 1
|
|||
vim.g['sneak#label'] = 1
|
||||
vim.g['sneak#s_next'] = 1
|
||||
vim.g['sneak#use_ic_scs'] = 0
|
||||
-- vsnip settings
|
||||
vim.g.vsnip_filetypes = {
|
||||
javascriptreact = {'javascript'},
|
||||
typescript = {'javascript'},
|
||||
typescriptreact = {'javascript', 'javascriptreact', 'typescript'}
|
||||
}
|
||||
|
||||
-- We do this to prevent the loading of the system fzf.vim plugin. This is
|
||||
-- present at least on Arch/Manjaro
|
||||
|
|
Loading…
Reference in a new issue