Skip to content

Commit

Permalink
Merge pull request #403 from choplin/fix-neosnippet
Browse files Browse the repository at this point in the history
fix neosnippet support
  • Loading branch information
fatih committed Apr 28, 2015
2 parents 8d42461 + 512cb47 commit 48125e6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ftplugin/go/snippets.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ function! s:GoNeosnippet()
endif

let g:neosnippet#enable_snipmate_compatibility = 1
exec 'NeoSnippetSource' globpath(&rtp, 'gosnippets/snippets/go.snip')

let gosnippets_dir = globpath(&rtp, 'gosnippets/snippets')
if type(g:neosnippet#snippets_directory) == type([])
let g:neosnippet#snippets_directory += [gosnippets_dir]
elseif type(g:neosnippet#snippets_directory) == type("")
if strlen(g:neosnippet#snippets_directory) > 0
let g:neosnippet#snippets_directory = g:neosnippet#snippets_directory . "," . gosnippets_dir
else
let g:neosnippet#snippets_directory = gosnippets_dir
endif
endif
endfunction

if g:go_snippet_engine == "ultisnips"
Expand Down

0 comments on commit 48125e6

Please sign in to comment.