We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a743abf commit e93611fCopy full SHA for e93611f
autoload/vsnip/source.vim
@@ -25,11 +25,14 @@ function! vsnip#source#filetypes( bufnr ) abort
25
if has( "nvim" )
26
let l:filetypes = v:lua.require'vsnip.treesitter'.get_ft_at_cursor( a:bufnr )
27
28
+ " buffer has no filetype defined
29
if l:filetypes.filetype == ""
30
return [ "global" ]
31
+
32
+ " buffer has filetype
33
else
- return get(
- \ g:vsnip_filetypes, l:filetypes.injected_filetype,
34
+ return
35
+ \ get( g:vsnip_filetypes, l:filetypes.injected_filetype,
36
\ get( g:vsnip_filetypes, l:filetypes.filetype,
37
\ [ l:filetypes.filetype ]
38
\ ) )
0 commit comments