Add interface for applying snippetTextEdits
This can be useful for rust-analyzer and other lsp-servers implementing their extension.
Not 100% sure luasnip is really the best place for this, but it makes more sense than each languageserver-extension wanting to expand these snippets implementing it themselves.
(nvim also doesn't really fit since it's just an extension to lsp, and not official)
Should not this also expose the companion lsp-capability that should be passed to the lsp-server? I mean, similar to what require('cmp_nvim_lsp').update_capabilities does.
Oh, yeah that makes sense.
Is there some standard for how the capabilities are updated? Or would one have to call update_capabilities(caps) manually?
Oh, yeah that makes sense. Is there some standard for how the capabilities are updated? Or would one have to call
update_capabilities(caps)manually?
Yes, it has to be manually, but it's something that those developing plugins that require it could do, like in this case the guys of rust-tools.
Thanks for taking a look, I had some more stuff to add though :D
Applying snippetTextEdits should work pretty well now, but we have some more complexity too:
There's a new option for snip_expand, jumplist_insert_func, which can link up snippets in a different way. Problem is, this is subject to some restrictions, and should be done carefully, so I'll have to add some pretty thorough documentation for it (or not document it at all, which would go a bit against having everything in extras not depend on internals)
In a similar vein, there's a lot of stuff that needs API for this to be really well-made, so far it's more of a POC