Now the parser introduced in #20 is utilized to provide more info to
cmp items. This info is used to improve the cmp documentation / preview
window (currently defaults to a hardcoded implementation showing
the description and snippet contents).
Snippets with option 'r' or 'e' are parsed but not passed on to cmp
at the moment.
Here is a screenshot for a snippet with the following definition:
snippet tabt "Some description"
The snippet contents
endsnippet
The documentation is provided by a function that takes the snippet info table as a parameter
and returns a string. We could let users overwrite this so they can display whatever they
want, e.g. also show the options associated with a snippet.
I have tested this and it should work (also the tests still pass). But please test this PR first before merging :)
Suggestions for improvement / changes are welcome.
Now the parser introduced in #20 is utilized to provide more info to cmp items. This info is used to improve the cmp documentation / preview window (currently defaults to a hardcoded implementation showing the description and snippet contents).
Snippets with option 'r' or 'e' are parsed but not passed on to cmp at the moment.
Here is a screenshot for a snippet with the following definition:
The documentation is provided by a function that takes the snippet info table as a parameter and returns a string. We could let users overwrite this so they can display whatever they want, e.g. also show the options associated with a snippet.
I have tested this and it should work (also the tests still pass). But please test this PR first before merging :) Suggestions for improvement / changes are welcome.