[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 22 02:16:00 PST 2018


hokein added inline comments.


================
Comment at: clangd/clients/clangd-vscode/src/extension.ts:4
 import { realpathSync } from 'fs';
+import { RequestType, TextDocumentIdentifier } from 'vscode-languageclient';
 
----------------
We have imported the whole module as `vscodelc`, maybe just use `vscodelc.RequestType`, `vscodelc.TextDocumentIdentifier`?


================
Comment at: clangd/clients/clangd-vscode/src/extension.ts:16
 
+export namespace SwitchSourceHeaderRequest {
+    export const type = new RequestType<TextDocumentIdentifier, string | undefined, void, void>('textDocument/switchSourceHeader');
----------------
Do we want to export this `SwitchSourceHeaderRequest`? it seems that we only use it in this module.


================
Comment at: clangd/clients/clangd-vscode/src/extension.ts:17
+export namespace SwitchSourceHeaderRequest {
+    export const type = new RequestType<TextDocumentIdentifier, string | undefined, void, void>('textDocument/switchSourceHeader');
+}
----------------
Is `textDocument/switchSourceHeader` a built-in support in vscode? Is it documented somewhere? I couldn't find any official document at https://code.visualstudio.com. Am I missing anything here?



Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54781





More information about the cfe-commits mailing list