Closed ColinKennedy closed 2 years ago
Hey @ColinKennedy, thanks for the PR, the issue is interesting. It would be awesome if you could raise a PR in my repo?
@ColinKennedy: Sorry for the slow response
@ColinKennedy I really like this approach! I have recently implemented a parser for snippet headers that allows us to retrieve more info about snippets than just the tab trigger and file path.
I think we should combine these approaches such that only the available snippets are shown. We could also make this configurable by users so they can decide whether only those snippets marked available by UltiSnips are provided or also the ones retrieved by the parser (that also includes regex snippets).
Over at nvim-cmp, I filed an issue while trying snippet autocompletion out - https://github.com/hrsh7th/nvim-cmp/issues/451
The issue is that auto-completion results showed all snippets, regardless of what was currently typed. I made a fork which implements that check, over here: https://github.com/ColinKennedy/cmp-nvim-ultisnips/tree/add_snippet_recognition
I haven't done performance metrics to see if there's a big hit but I haven't noticed any slow down with completion results. Would you be interested in adding this in a PR?