autoClosingBrackets are forced off if autoCloseTags is enabled#62
Conversation
a04213f to
57581be
Compare
| function getSettings(): JSON { | ||
| let configXML = workspace.getConfiguration(); | ||
|
|
||
| let autoCloseTags = configXML.get("xml.completion.autoCloseTags"); |
There was a problem hiding this comment.
this should only happen on configuration change on the client side.
there's no need to send that config to the server
|
|
||
| let autoCloseTags = configXML.get("xml.completion.autoCloseTags"); | ||
| let autoClosingBrackets = configXML.get("[xml]")["editor.autoClosingBrackets"]; | ||
| if (autoCloseTags && autoClosingBrackets != "never") { |
There was a problem hiding this comment.
you need to ask permission for changing the value. Not do it 1st and ask for forgiveness
b392503 to
6486e19
Compare
| (error) => console.log(error) | ||
| ); | ||
| } | ||
| else { |
There was a problem hiding this comment.
be careful, this is the case when user presses escape. You don't want to do anything if action gets cancelled on purpose
There was a problem hiding this comment.
good catch, ill fix
6486e19 to
da64432
Compare
| let autoCloseTags = configXML.get("xml.completion.autoCloseTags"); | ||
| let autoClosingBrackets = configXML.get("[xml]")["editor.autoClosingBrackets"]; | ||
| if (autoCloseTags && autoClosingBrackets != "never") { | ||
| window.showInformationMessage( |
da64432 to
fa23a10
Compare
6e221ab to
ba94c4f
Compare
|
@fbricon Updated, I didnt add the preference for the warning though. It will just remember for the servers lifecycle and not ask again. |
ba94c4f to
4e699ff
Compare
| let configXML = workspace.getConfiguration(); | ||
| let autoCloseTags = configXML.get("xml.completion.autoCloseTags"); | ||
| let autoClosingBrackets = configXML.get("[xml]"); | ||
| console.log(autoClosingBrackets); |
| let autoCloseTags = configXML.get("xml.completion.autoCloseTags"); | ||
| let autoClosingBrackets = configXML.get("[xml]"); | ||
| console.log(autoClosingBrackets); | ||
| autoClosingBrackets = autoClosingBrackets["editor.autoClosingBrackets"]; |
There was a problem hiding this comment.
please use a different variable name. this is too confusing
|
Few minor changes left to do but it looks pretty good now. |
Fixes redhat-developer#38 Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
4e699ff to
40859e1
Compare
|
@fbricon Updated |
No description provided.