vscode-extensions

VS Code, changing color theme for variables

放肆的年华 提交于 2020-06-27 13:06:28
问题 in VS Code does anyone know how to change the color theme for variable names for C++. I can change the colors for functions, comments, keywords, but I can't get variables to work. Any help would be great Thanks. 回答1: UPDATE: this is now possible with the C++ extension. Upvote @TheBat's answer since he originally posted the update. The scope is variable.other.local and his answer shows what to add to your settings file. NOTE: the answer below is still accurate if you do not have the extension

VS Code, changing color theme for variables

拈花ヽ惹草 提交于 2020-06-27 13:05:03
问题 in VS Code does anyone know how to change the color theme for variable names for C++. I can change the colors for functions, comments, keywords, but I can't get variables to work. Any help would be great Thanks. 回答1: UPDATE: this is now possible with the C++ extension. Upvote @TheBat's answer since he originally posted the update. The scope is variable.other.local and his answer shows what to add to your settings file. NOTE: the answer below is still accurate if you do not have the extension

Wait until a symbol provider is available

99封情书 提交于 2020-06-17 09:48:11
问题 I am writing a Go adapter extension for the Test Explorer extension for Visual Studio Code. My extension uses language services from Microsoft's Go extension: const symbols = await vscode.commands.executeCommand('vscode.executeDocumentSymbolProvider', uri) However, I have an issue. When I specify extensionDependencies and activationEvents correctly (in package.json), symbols don't initially load (the command returns undefined ). If I set activationEvents to * or if I delay for long enough in

How to initiate “findInFiles” with VSCode extension API?

岁酱吖の 提交于 2020-06-16 19:10:11
问题 I'm trying to write an extension that will automatically select the word under the cursor, open the find in files dialog, and initiate a search with that selection. So far, I've been able to get the extension to do everything except actually initiating the search. I still have to press enter in the find in files dialog to actually do the search. Here's the extension code I have so far: import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { let

How to initiate “findInFiles” with VSCode extension API?

时间秒杀一切 提交于 2020-06-16 19:07:31
问题 I'm trying to write an extension that will automatically select the word under the cursor, open the find in files dialog, and initiate a search with that selection. So far, I've been able to get the extension to do everything except actually initiating the search. I still have to press enter in the find in files dialog to actually do the search. Here's the extension code I have so far: import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { let

How to initiate “findInFiles” with VSCode extension API?

怎甘沉沦 提交于 2020-06-16 19:06:17
问题 I'm trying to write an extension that will automatically select the word under the cursor, open the find in files dialog, and initiate a search with that selection. So far, I've been able to get the extension to do everything except actually initiating the search. I still have to press enter in the find in files dialog to actually do the search. Here's the extension code I have so far: import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { let

Changing file EOL with vscode extension API

痞子三分冷 提交于 2020-06-11 21:26:13
问题 Can I silently change end of line sequence in VSCode? Something like this: vscode.commands.executeCommand("workbench.action.editor.changeEOL", "LF"); 回答1: You can add this line to your user preferences settings (CTRL + ,): "files.eol": "\n" 回答2: On the bottom right of vs code it will say lf or crlf. Click there and it will give an option to change.see pic of vs code 回答3: The solution is: editor.edit(builder => { builder.setEndOfLine(vscode.EndOfLine.LF); }) 来源: https://stackoverflow.com

Changing file EOL with vscode extension API

青春壹個敷衍的年華 提交于 2020-06-11 21:20:24
问题 Can I silently change end of line sequence in VSCode? Something like this: vscode.commands.executeCommand("workbench.action.editor.changeEOL", "LF"); 回答1: You can add this line to your user preferences settings (CTRL + ,): "files.eol": "\n" 回答2: On the bottom right of vs code it will say lf or crlf. Click there and it will give an option to change.see pic of vs code 回答3: The solution is: editor.edit(builder => { builder.setEndOfLine(vscode.EndOfLine.LF); }) 来源: https://stackoverflow.com

Visual Studio Code SFTP to multiple servers

痞子三分冷 提交于 2020-05-29 08:42:35
问题 In PhpStorm, there is a way to configure multiple SFTP endpoints and chose which server you want to upload to. I'm looking for this functionality in Visual Studio Code. I have installed SFTP VS Code extension and I am able to configure it for one endpoint. What if I want to upload a file to multiple servers? How can I configure that? Or is there another extension that does that? 回答1: There are lot of add-ins that will work for your requirements. Below are a list of few https://marketplace

How to run a system command from VSCode extension

三世轮回 提交于 2020-05-25 03:34:12
问题 I am trying to create a simple VSCode extension to run a set of commands when I open a folder. Basically these commands will set up our development environment. I have started off creating the boilerplace and ran through the example that VSCode provided but I am not clear how to run system commands. Appreciate any help or point me to some documentation about this topic. 回答1: Your extension environment has access to node.js libraries, so you can just use child_process or any helper libraries