[clang-tools-extra] r357078 - [clangd] Fix the inconsistent code indent in vscode extension, NFC.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 27 08:50:33 PDT 2019
Author: hokein
Date: Wed Mar 27 08:50:33 2019
New Revision: 357078
URL: http://llvm.org/viewvc/llvm-project?rev=357078&view=rev
Log:
[clangd] Fix the inconsistent code indent in vscode extension, NFC.
Modified:
clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts
Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts?rev=357078&r1=357077&r2=357078&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts (original)
+++ clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts Wed Mar 27 08:50:33 2019
@@ -102,27 +102,27 @@ export function activate(context: vscode
revealOutputChannelOn: vscodelc.RevealOutputChannelOn.Never
};
- const clangdClient = new vscodelc.LanguageClient('Clang Language Server', serverOptions, clientOptions);
- console.log('Clang Language Server is now active!');
- context.subscriptions.push(clangdClient.start());
- context.subscriptions.push(vscode.commands.registerCommand(
- 'clangd-vscode.switchheadersource', async () => {
- const uri =
- vscode.Uri.file(vscode.window.activeTextEditor.document.fileName);
- if (!uri) {
- return;
- }
- const docIdentifier =
- vscodelc.TextDocumentIdentifier.create(uri.toString());
- const sourceUri = await clangdClient.sendRequest(
- SwitchSourceHeaderRequest.type, docIdentifier);
- if (!sourceUri) {
- return;
- }
- const doc = await vscode.workspace.openTextDocument(
- vscode.Uri.parse(sourceUri));
- vscode.window.showTextDocument(doc);
- }));
+ const clangdClient = new vscodelc.LanguageClient('Clang Language Server',serverOptions, clientOptions);
+ console.log('Clang Language Server is now active!');
+ context.subscriptions.push(clangdClient.start());
+ context.subscriptions.push(vscode.commands.registerCommand(
+ 'clangd-vscode.switchheadersource', async () => {
+ const uri =
+ vscode.Uri.file(vscode.window.activeTextEditor.document.fileName);
+ if (!uri) {
+ return;
+ }
+ const docIdentifier =
+ vscodelc.TextDocumentIdentifier.create(uri.toString());
+ const sourceUri = await clangdClient.sendRequest(
+ SwitchSourceHeaderRequest.type, docIdentifier);
+ if (!sourceUri) {
+ return;
+ }
+ const doc = await vscode.workspace.openTextDocument(
+ vscode.Uri.parse(sourceUri));
+ vscode.window.showTextDocument(doc);
+ }));
const status = new FileStatus();
context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(() => {
status.updateStatus();
More information about the cfe-commits
mailing list