[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread James Findley via Phabricator via cfe-commits
jfindley created this revision.
jfindley added a reviewer: ioeric.
jfindley added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, 
ilya-biryukov.

When using the vscode clangd plugin, lots and lots of junk output is printed to 
the output window, which constantly reopens itself.
Example output:

I[11:13:17.733] <-- textDocument/codeAction(4)
I[11:13:17.733] --> reply:textDocument/codeAction(4) 0 ms
I[11:13:17.937] <-- textDocument/codeAction(5)
I[11:13:17.937] --> reply:textDocument/codeAction(5) 0 ms
I[11:13:18.557] <-- textDocument/hover(6)
I[11:13:18.606] --> reply:textDocument/hover(6) 48 ms

This should prevent that from happening.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D55052

Files:
  clangd/clients/clangd-vscode/src/extension.ts


Index: clangd/clients/clangd-vscode/src/extension.ts
===
--- clangd/clients/clangd-vscode/src/extension.ts
+++ clangd/clients/clangd-vscode/src/extension.ts
@@ -54,7 +54,9 @@
 code2Protocol: (value: vscode.Uri) => value.toString(),
 protocol2Code: (value: string) =>
 vscode.Uri.file(realpathSync(vscode.Uri.parse(value).fsPath))
-}
+},
+// Avoid lots of junk in output
+revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never
 };
 
   const clangdClient = new vscodelc.LanguageClient('Clang Language Server', 
serverOptions, clientOptions);


Index: clangd/clients/clangd-vscode/src/extension.ts
===
--- clangd/clients/clangd-vscode/src/extension.ts
+++ clangd/clients/clangd-vscode/src/extension.ts
@@ -54,7 +54,9 @@
 code2Protocol: (value: vscode.Uri) => value.toString(),
 protocol2Code: (value: string) =>
 vscode.Uri.file(realpathSync(vscode.Uri.parse(value).fsPath))
-}
+},
+// Avoid lots of junk in output
+revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never
 };
 
   const clangdClient = new vscodelc.LanguageClient('Clang Language Server', serverOptions, clientOptions);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread James Findley via Phabricator via cfe-commits
jfindley marked an inline comment as done.
jfindley added inline comments.



Comment at: clangd/clients/clangd-vscode/src/extension.ts:59
+// Avoid lots of junk in output
+revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never
 };

ioeric wrote:
> Does this mean that clangd's output will never reach vscode? Is there a way 
> to see the output with this set? I think there are cases where the output 
> would be useful for users (e.g. to check status).
It still reaches vscode, it just tells vscode not to automatically open the 
output window any time you do anything.  You can still manually open the output 
window to see clangd info if you want to.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55052/new/

https://reviews.llvm.org/D55052



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread James Findley via Phabricator via cfe-commits
jfindley updated this revision to Diff 175897.
jfindley added a comment.

Changed the comment to be a little more helpful.  I used 'output' rather than 
errors because depending on verbosity level it can be more than just errors 
printed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55052/new/

https://reviews.llvm.org/D55052

Files:
  clangd/clients/clangd-vscode/src/extension.ts


Index: clangd/clients/clangd-vscode/src/extension.ts
===
--- clangd/clients/clangd-vscode/src/extension.ts
+++ clangd/clients/clangd-vscode/src/extension.ts
@@ -54,7 +54,9 @@
 code2Protocol: (value: vscode.Uri) => value.toString(),
 protocol2Code: (value: string) =>
 vscode.Uri.file(realpathSync(vscode.Uri.parse(value).fsPath))
-}
+},
+// Do not switch to output window when clangd returns output
+revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never
 };
 
   const clangdClient = new vscodelc.LanguageClient('Clang Language Server', 
serverOptions, clientOptions);


Index: clangd/clients/clangd-vscode/src/extension.ts
===
--- clangd/clients/clangd-vscode/src/extension.ts
+++ clangd/clients/clangd-vscode/src/extension.ts
@@ -54,7 +54,9 @@
 code2Protocol: (value: vscode.Uri) => value.toString(),
 protocol2Code: (value: string) =>
 vscode.Uri.file(realpathSync(vscode.Uri.parse(value).fsPath))
-}
+},
+// Do not switch to output window when clangd returns output
+revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never
 };
 
   const clangdClient = new vscodelc.LanguageClient('Clang Language Server', serverOptions, clientOptions);
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread James Findley via Phabricator via cfe-commits
jfindley marked an inline comment as done.
jfindley added a comment.

In D55052#1313048 , @ioeric wrote:

> James, do you have commit access to llvm? If not, I'm happy to land the patch 
> for you.


I do not have commit access - if you could land it that would be great, thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55052/new/

https://reviews.llvm.org/D55052



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits