-
Notifications
You must be signed in to change notification settings - Fork 186
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
Add support for CompletionList.itemDefaults #2194
Conversation
closes #2043
we don't need a fallback here, becasue we have the following code in LSP/plugin/completion.py: if item.get("insertTextFormat", InsertTextFormat.PlainText) == InsertTextFormat.Snippet: self.view.run_command("insert_snippet", {"contents": new_text})
For the spec, see: CompletionList.itemDefaults https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionList CompletionItem.textEditText https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem |
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
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.
Looks good to me but lets wait for one extra eyes.
Co-authored-by: jwortmann <jwortmann@outlook.com>
closes #2043
This PR add support for item defaults, for the following fields:
The additional logic transforms
editRange
+textEditText
(if present) to a TextEdit. So all of the logic of how we dealed with TextEdits, stayed the same.This can be tested with this PR of LSP-tailwindcss. That PR is not merged yet, but I do plan to merge it soon.