diff --git a/nvim/.config/nvim/after/plugin/vsnip.vim b/nvim/.config/nvim/after/plugin/vsnip.vim deleted file mode 100644 index 97ec2f8..0000000 --- a/nvim/.config/nvim/after/plugin/vsnip.vim +++ /dev/null @@ -1,19 +0,0 @@ -" Expand -imap vsnip#expandable() ? '(vsnip-expand)' : '' -smap vsnip#expandable() ? '(vsnip-expand)' : '' - -" Expand or jump -imap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' -smap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' - -" Select or cut text to use as $TM_SELECTED_TEXT in the next snippet. -" See https://github.com/hrsh7th/vim-vsnip/pull/50 -nmap s (vsnip-select-text) -xmap s (vsnip-select-text) -nmap S (vsnip-cut-text) -xmap S (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'] diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 9231efe..d30a75d 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -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