forked from OSchip/llvm-project
[clangd] Fix the inconsistent code indent in vscode extension, NFC.
llvm-svn: 357078
This commit is contained in:
parent
6c56edfe42
commit
55beb2f549
|
@ -102,27 +102,27 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue