-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: snippet extension #3054
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <david@davidchristiansen.dk>
b34cef1
to
c85e051
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.