Closed hiberabyss closed 2 years ago
What do you mean by "snip content" ? (the snippet source ?, to what it would expand without input ?)
If you want to retrieve the source code, from python you can retrieve it with _value
attribute of SnippetDefinition
instances.
Check out this class, you can actually retrieve anything from a snippet with it
...Don't bother about the undescore, though it's undocumented api, Since this part of the code seems quite stable to me, I don't think it will change soon...
For more details, you'll have to tell more about what you want to achieve, and the context (python, vimL ? how did you get the snippet list ? etc.)
I hope I kind of provided an answer...
As @hl037 said, if you want to access additional info than what UltiSnips provides you will need to write some Python code. If you're interested in an example, click here to see how we did it at cmp-nvim-ultisnips (that code should work for both Vim and Neovim).
Thanks to everybody providing feedback. OP did not get back, so I assume their interest has vaned or their problem is solved. Closing.
Is it possible to have function return snip content for auto-completion description?