LSP: Use snippet insert mode to add closing braces#96726
Closed
HolonProduction wants to merge 1 commit intogodotengine:masterfrom
Closed
LSP: Use snippet insert mode to add closing braces#96726HolonProduction wants to merge 1 commit intogodotengine:masterfrom
HolonProduction wants to merge 1 commit intogodotengine:masterfrom
Conversation
Member
Author
|
I'm converting this to a draft for now, as I stated above this should be locked behind client capability tracking which isn't implemented at the moment, so this might break LSP compatibility with editors that aren't VSCode. When/if capability tracking is a thing we can revisit this, in the meantime we should just strip those quotes and parenthesis. Also godotengine/godot-proposals#6312 seems related to this. |
Member
Author
|
Superseded by #114598 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #84549
LSP clients don't seem to auto-close braces from insert texts (seems like unspecified territory). We can instead close them in the server and use the snippet insert mode to place the caret between the braces:
Screencast.from.2024-09-08.22-00-12.webm
Note
In theory this should be locked behind certain client capabilities, but from what I see we don't track them.