- Query vim-vsnip plugin for snippet completions and add the items
to the completion list.
- Add a boolean flag to set vsnip completion option
- Update documentation
- Without this enhancement vsnip could only expand LSP provided
snippets
- Inteface to vim-vsnip plugin is based on hrsh7th/cmp-vsnip
Completion is not triggered for non-keyword characters like '#' (ex. #
before #if in C) even though vsnip is capable of such completion,
unless LSP server sets special characters as trigger characters. This
is not a major shortcoming since it will expand once a keyword
character is typed (say, #i in #if). To address this issue some code
reorganization is needed, and perhaps separation of completion
mechanism from the LSP client core.
User can define keymaps for Tab completion as follows:
(<Space> will expand the snippet)