Output window comes into foreground whenever anything bad happens
Closed this issue ยท 8 comments
Any errors that are coming through the Ember Language Server cause the Output window to switch to Ember Language Server
and come into the foreground. This is a bit overzealous as even writing out the name of a component causes an error for each letter typed until the name is correct.
I tried to record a gif but LICEcap recorded black for some reason
For example:
All is well, no errors are present. Begin adding a component into my template:
An error is logged for each input letter:
Code: -32603
[Error - 11:22:06 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Parse error on line 2:
Hello World{{mELSCompletionDummy
-------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
Code: -32603
[Error - 11:22:07 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Parse error on line 2:
Hello World{{myELSCompletionDummy
-------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
Code: -32603
[Error - 11:22:07 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Parse error on line 2:
Hello World{{my-ELSCompletionDumm
-------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
Code: -32603
[Error - 11:22:08 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Parse error on line 2:
Hello World{{my-cELSCompletionDum
-------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
Code: -32603
[Error - 11:22:08 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Parse error on line 2:
Hello World{{my-coELSCompletionDu
-------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
Code: -32603
Until the component name is valid:
Each error causing the Output window to appear, which is very annoying.
I'm pretty sure this is on VS Code, as the same happens when not in an Ember project.
As far as I know the behaviour when the output channel reveals itself can be defined by the extension in the client options, so this can (and probably should) be fixed on our side.
It looks like this was occurring for Angular's extension also. See microsoft/vscode#31474 (comment) and
angular/vscode-ng-language-service#128 for details.
Would be nice to have this fixed soon. Really annoying issue.
As far as I can tell we have to specify revealOutputChannelOn
(see https://github.com/Microsoft/vscode-languageserver-node/blob/4b4769742fc2f3868812fde7c608e46303c141f8/client/src/client.ts#L457) in our LanguageClientOptions over here: https://github.com/emberwatch/vscode-ember/blob/master/src/extension.ts#L31
A PR would be welcomed :)
As per this part of the file, I would assume the desired behaviour is 4 (Never)?
Seems like somebody just needs to add
revealOutputChannelOn: RevealOutputChannelOn.never
to that file you linked. I personally have no experience in building vscode extensions but could be an easy fix for somebody.
Great to see this fixed :) Can't wait for another release
Just came here to report this issue and am also looking forward to a new release. (Thanks for the awesome work here, @t-sauer.)