-
Notifications
You must be signed in to change notification settings - Fork 93
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
Send workspace/applyEdit
to client for auto-close of tags
#324
Comments
I think we can probably switch to using |
I think the LS can try to compare the previous document state with the current one on documentChange to sort out the smaller grain change can trigger an auto-edit. But at this point, I guess it's the same difficulty than implementing incremental mode... |
I'd be more inclined to (ab)use the completion request instead |
That would be already a nice way to provide a good chunk of value. |
This issue is implemented by https://github.com/NikolasKomonen/lsp4xml/tree/autoCompletionMigration |
This issue is marked as "blocked by LSP", but in reality, isn't it more blocked by lack of support for incremental changes in lsp4xml? |
@mickaelistria |
Ok, so this is microsoft/language-server-protocol#724 , isn't it? |
yup, not sure if it's being worked on currently or is just in the backlog. I created a similar issue previously but it's been overridden by microsoft/language-server-protocol#724, which should be the one to follow for any updates. |
Wouldn't https://microsoft.github.io/language-server-protocol/specification#textDocument_onTypeFormatting be the right thing to use here? |
We need to experiment it for XML. But for HTML language server it will require to do the same thing if it works |
What is the currently status for this issue? |
Auto-edits like closing tags as user types should be implemented using the standard
workspace/applyEdit
command.Basically, the LS would listen to documentChange (so far, so good), and when it is detected that an opening tag was closed (like
<hello>
, it should send theworkspace/applyEdit
command to add the</hello>
tag at the right location).The text was updated successfully, but these errors were encountered: