-
Notifications
You must be signed in to change notification settings - Fork 79
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
EntityNotDeclared codeAction (quick fix) not using proper indentation settings #267
Comments
Need to implement workspace/configuration requests from the server. See redhat-developer/vscode-java#1081 (comment) |
datho7561
added a commit
to datho7561/vscode-xml
that referenced
this issue
Oct 7, 2020
Uses requests to the preferences `xml.format.insertSpaces` and `xml.format.tabSize` to provide the indentation of the current file Copied from: https:/redhat-developer/vscode-java/pull/1081/files Along with redhat-developer#903, closes redhat-developer#267 Signed-off-by: David Thompson <[email protected]>
angelozerr
pushed a commit
that referenced
this issue
Oct 13, 2020
Uses requests to the preferences `xml.format.insertSpaces` and `xml.format.tabSize` to provide the indentation of the current file Copied from: https:/redhat-developer/vscode-java/pull/1081/files Along with #903, closes #267 Signed-off-by: David Thompson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Copy-paste from eclipse/lemminx#759)
If
editor.insertSpaces
is set tofalse
, the EntityNotDeclared code action does not insert new content with tabs. Instead, the code action inserts new content with spaces.Example xml:
Before quick fix:
Hover over the error message and invoke the quick fix.
After quick fix:
This is because codeAction requests do not receive formatting settings like formatting requests do.
LSP spec: https://microsoft.github.io/language-server-protocol/specification#textDocument_formatting
Related issue: microsoft/language-server-protocol#780
The codeAction is inserting two spaces instead of a single tab, because in the lemminx side, the defaults settings are
insertSpaces: true
andtabSize: 2
: https:/eclipse/lemminx/blob/84d268957060b53aee211bd75a34b4536e9dab1e/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/settings/XMLFormattingOptions.java#L117-L118Currently, VS Code is not sending lemminx its values for
editor.insertSpaces
andeditor.tabSize
.The text was updated successfully, but these errors were encountered: