Repository navigation
feat: snippet extension - #3054
Conversation
|
|
The LSP issue isn't easy to read, so let me quote it. The main point is here: You would think the process is: 1) add some feature to the LSP spec 2) get this feature implemented in editors. But the comment above proves it goes the other way around. So indeed "insert snippets as text edits" is not yet part of the LSP specification but it is already supported by VSCode. |
|
@PatrickMassot Requiring implementations before adding something to a spec is very good practice - it's difficult to know what will be good in practice without having first used it. IMHO they should require at least two completely independent implementations - this would also help discover places where the documentation or specification is lacking and help ensure that the protocol actually does meet its goal of working in multiple editors. |
david-christiansen
left a comment
There was a problem hiding this comment.
I have some stylistic nitpicks on docstrings.
I can think of lots of cases where this would be a really nice feature!
I'm not complaining at all, I'm was trying to provide more context in order to avoid seeing this important PR closed by someone arguing this isn't part of the spec. |
Co-authored-by: David Thrane Christiansen <[email protected]>
b34cef1 to
c85e051
Compare
mhuisi
left a comment
There was a problem hiding this comment.
Very late approval, but these changes look good to me.
Summary
This makes a small addition to our take on the LSP protocol
in the form of supporting snippet text edits.
It has been discussed here on the LSP issue tracker for a while,
but seems unlikely to be added anytime soon.
This feature was requested by @PatrickMassot for the purposes
of supporting Lean code templates in code actions and widgets.