416 questions
97
votes
5
answers
77k
views
Create Custom Language in Visual Studio Code
Is there a way to extend the supported languages/grammars in Visual Studio Code?
I'd like to add a custom language syntax, but I've not been able to find any information on how language services are ...
12
votes
3
answers
16k
views
Regex look behind in VS Code?
I'm working on a grammar extension in VS Code, and I'm having difficulty with a look behind regex pattern. Given the following string, I want to only return cmp when it's preceded by the @fmt(
@fmt(...
19
votes
2
answers
9k
views
How can I run multiple commands with a single VS Code keybinding without an extension?
Is it possible to run multiple commands from a single keybinding/shortcut, just like a macro operates, in VS Code but without an extension?
I know there are some extensions that can do this but is ...
147
votes
6
answers
135k
views
Where are the VSCode error logs for extensions?
When I get an extension error I have no way of knowing why the error happens.
57
votes
10
answers
66k
views
VSCode: How to run a command after each terminal open?
On Windows I have to run the command start-ssh-agent.cmd on each new terminal session I open. My development environment is VSCode, and I open a dozen new terminals each day. After each terminal open, ...
8
votes
4
answers
5k
views
How to use Terminal API to listen to all terminal commands/output in VS Code?
I want to listen to terminal output from extension, such as tsc -w and catch the moment if the output contains similar text:
Found 1 error. Watching for file changes.
Or the error exit code or ...
21
votes
3
answers
28k
views
How can I customize comment block characters in Visual Studio Code?
I created a language extension for Visual Studio Code and I would like to change the comment block characters, but I couldn't find a way to do so..
How can I do it?
11
votes
1
answer
8k
views
Where can I find a list of all possible keys for tm-themes for syntax highlighting?
In the tmTheme file for my current text editor there are a number of options, including the ones in the code below. Is there a list somewhere that defines all possible tags that could be included in ...
20
votes
3
answers
14k
views
vscode extension: deprecation warning `Buffer()`, how to diagnose
I am rebuilding my comment highlighter in to a new extension.
However I now run now in to an issue where I get the following warning:
(node:4904) [DEP0005] DeprecationWarning:
Buffer() is deprecated ...
18
votes
3
answers
13k
views
How to persist information for a vscode extension?
I'm planning to write a Visual Studio Code extension and it need to save some information for example a counter. The user can press a shortcut to increase or decrease the counter and the value of the ...
9
votes
1
answer
4k
views
Adding conditions to "when" from VS-code extension?
The code editor I've been using for the past 20 years (codewright) allows you to set a "select mode". When that is set, all keyboard cursor movements extend the selection. In VS Code, you can extend ...
45
votes
5
answers
21k
views
Change Integrated Terminal title in vscode
We can open command prompt in vscode by using the Integrated Terminal feature in View menu.
We can even open multiple terminals as shown below:
Is there any way I can change the title of the terminal ...
40
votes
4
answers
83k
views
Customizing syntax highlighting in Visual Studio Code
I'm currently trying to write an extension for a new file type (ANTLR) and wonder how to change the colors used for syntax highlighting in Visual Studio Code. To me it looks as if that is not defined ...
29
votes
5
answers
44k
views
"No extensions found" when running Visual Studio Code from source
When I try to install any extension in Visual Studio Code (i.e., by pressing Ctrl+P and then running ext install RustyCode), I get a message that No extensions found.
However, this only happens when ...
15
votes
4
answers
3k
views
Opening VS Code settings window from extension with specific search query
I am writing a VS Code extension where I want to open the settings window programmatically from my extension. I want the window to already have the search filled out to only show the settings my ...