I broke up with neovim....vim is my best friend now
This commit is contained in:
43
dot_vim/plugged/vim-vsnip/autoload/vsnip/snippet/node.vim
Normal file
43
dot_vim/plugged/vim-vsnip/autoload/vsnip/snippet/node.vim
Normal file
@@ -0,0 +1,43 @@
|
||||
let s:Placeholder = vsnip#snippet#node#placeholder#import()
|
||||
let s:Variable = vsnip#snippet#node#variable#import()
|
||||
let s:Text = vsnip#snippet#node#text#import()
|
||||
let s:Transform = vsnip#snippet#node#transform#import()
|
||||
|
||||
"
|
||||
" vsnip#snippet#node#create_from_ast
|
||||
"
|
||||
function! vsnip#snippet#node#create_from_ast(ast) abort
|
||||
if type(a:ast) == type([])
|
||||
return map(a:ast, 'vsnip#snippet#node#create_from_ast(v:val)')
|
||||
endif
|
||||
|
||||
if a:ast.type ==# 'placeholder'
|
||||
return s:Placeholder.new(a:ast)
|
||||
endif
|
||||
if a:ast.type ==# 'variable'
|
||||
return s:Variable.new(a:ast)
|
||||
endif
|
||||
if a:ast.type ==# 'text'
|
||||
return s:Text.new(a:ast)
|
||||
endif
|
||||
|
||||
throw 'vsnip: invalid node type'
|
||||
endfunction
|
||||
|
||||
"
|
||||
" vsnip#snippet#node#create_text
|
||||
"
|
||||
function! vsnip#snippet#node#create_text(text) abort
|
||||
return s:Text.new({
|
||||
\ 'type': 'text',
|
||||
\ 'raw': a:text,
|
||||
\ 'escaped': a:text
|
||||
\ })
|
||||
endfunction
|
||||
|
||||
"
|
||||
" vsnip#snippet#node#create_transform
|
||||
"
|
||||
function! vsnip#snippet#node#create_transform(transform) abort
|
||||
return s:Transform.new(a:transform)
|
||||
endfunction
|
||||
Reference in New Issue
Block a user