You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If editor.insertSpaces is set to false, the EntityNotDeclared code action does not insert new content with tabs. Instead, the code action inserts new content with spaces.
(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://github.com/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: