Conversation
|
Should not this also expose the companion lsp-capability that should be passed to the lsp-server? I mean, similar to what |
|
Oh, yeah that makes sense. |
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. |
e01ca3e to
08ec7b9
Compare
55f27e5 to
bba9164
Compare
Default is not changed here.
If jumplist_insert is configurable, we should clean this up a bit. IMO it might be expected that the links between a snippets and its i(0), i(-1) exist, so we'll just add them. If this is not desired, they can still be overridden easily.
This might break some previously-working jump_into_funcs.
Explained in one of the comments, essentially we want the snippetTextEdits to be visited one after the other, beginning with the first. This is not the default-behaviour, and thus needs some extra work.
…ions. In particular, snip.next.next of a i(0), or snip.prev.prev of a i(-1) is often assumed to be the next/previous snippet, which is not the case if we do the modifications from the parent. Instead: just modify behaviour of i(-1), such that it is just ignored while jumping.
b52c754 to
f3c95f3
Compare
|
Thanks for taking a look, I had some more stuff to add though :D |
This can be useful for
rust-analyzerand 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)