Questions tagged [vscode-extensions]

Use this tag for questions about the Visual Studio Code Extension API and extension development. Questions only about extension usage should use the [visual-studio-code] tag instead.

Questions about the Visual Studio Code (VSCode) Extension API and extension development. Questions only about extension usage should use the [visual-studio-code] tag instead.

If you have a question about extension development that isn't a good fit for the Stack Exchange model, use the VS Code Dev Community Slack channel where extension developers help each other out and you can ask questions and find support.

4227 questions
1
vote
0 answers

How change vscode specific language colors

I would like to use VS code to handle the Siemens SIMOTION ST code, in this way I can use the power of vscode, that is missing in the original editor (multi line selection, select a word and find immediately where that word is used etc). To do that…
Stefano Martini
  • 408
  • 2
  • 17
1
vote
1 answer

Formatting all files in a directory in vs code

Related: How do I Change VSCode To Indent 4 Spaces Instead Of Default 2? Is there a way to format all src files in a project in vscode? In: the formatting is set by default to LF, but the environment (win) expects CRLF. This can be done by hand but…
Sebi
  • 4,262
  • 13
  • 60
  • 116
1
vote
1 answer

VSCode Extension Using executeDocumentSymbolProvider API

I am writing a VSCode extension and want to use the executeDocumentSymbolProvider API to get the list of functions of a file. I mainly have 2 problems with how to use executeDocumentSymbolProvider: How to correctly use…
WhaleShark
  • 75
  • 6
1
vote
0 answers

onDidChangeSemanticTokens doesn't consistently trigger provideDocumentSemanticTokens

For my extension I'm implementing the SemanticTokenProvider. This works great when edits are being parsed by my server, and everything looks good. However, I've created functionality regarding TextEdits so they are bundled together if typed within a…
1
vote
0 answers

VS Code change file extension at file save as dialog

On some files I need to change standard save as file dialog. I want to use custom command that executed 'workbench.action.files.saveLocalFile' command with some params that can change availible file extensions. Where I can find the params if they…
ssb.serman
  • 155
  • 1
  • 12
1
vote
1 answer

How to return a value out of an async function in javascript?

I develop a vscode extension and I want to take a value from a user and use it later. I use async/await because otherwise I don't get the promt input for the user. async function input() { const destBranch = await…
mariniou77
  • 27
  • 5
1
vote
1 answer

How to write a test for window.showInformationMessage vscode extension API

How would one unittest, with the default mocha framework for extensions, the action of selecting one of the items in an information/warning/error message that is part of a VSCode extension? function foo() { const GoToHelp = 'Go to Help'; …
gnikit
  • 1,031
  • 15
  • 25
1
vote
0 answers

VS Code Webview - preview multiple html

folder style.css action.js index.html foo.html bar.html I have a number of html files (which are being created by other task, on the fly) in the structure above: index.html has hyperlinks for the foo.html and bar.html and they have a…
Mr.B
  • 61
  • 1
  • 5
1
vote
0 answers

How can i create a VSCode plugin that enhances type detection in javascript code?

My current project has some last struggled with regards to type detection. And since there is no plugin that fits my needs i'm thinking about creating one. I know visual studio code plugins can do a lot of interesting things. I'm using javascript to…
1
vote
1 answer

VSCode says my interpreter is invalid, tried all fixes in the web to no avail

If anyone can help, please do so as I have been trying to fix this for hours to no avail. And yes I have tried numerous solutions found on Google, Stack Overflow, and even Reddit. I have been using Python with VSCode for the longest time but now it…
Pongbao
  • 53
  • 5
1
vote
0 answers

How to configure VS Code intellisense to support custom class pattern (`class: " "` rather than just `class= " "`)?

I'm working on Rails's html.erb file, after a lot of fiddling I'm finally figured out how to make intellisense autosuggestion works. The problem is it currently works with this class = "" pattern but not class: "" pattern which is the way to…
1
vote
0 answers

How to open VS Code WebViewPanel on click of hyperlink?

I'm pretty new to VS Code extension development. I'm trying to create and open a WebViewPanel on click of a Diagnostic target URI. Till now, I'm able to create a Diagnostic and create a WebViewPanel separately. But with the below code, n number of…
1
vote
1 answer

Using Webaudio in vscode extension

I wrote a vscode extension that creates a webview panel and I'd like to play an audio buffer when the user clicks a button on my page. I have this identical code working in a test page in a browser so I think I'm doing the webaudio part correctly. I…
Paulie
  • 1,940
  • 3
  • 20
  • 34
1
vote
1 answer

Is it possible to automatically select command option while running extension command in task?

I’m using «PlantUML» extension, and I want to export diagram automatically on file save. For this purpose I found «Trigger Task on Save» extension and tried write task that will execute command «command:plantuml.exportCurrent» on save of any .puml…
Artemio
  • 13
  • 2
1
vote
0 answers

Is it possible using a vscode extension to get info on which regions are folded in the editor?

I would like to find a way to get the folded regions in the active editor using a custom extension. I have done a lot of researches, but I didn't find anything on this subject. Also, I tried to query the state.vscdb of the workspace, but I am not…
Axel
  • 361
  • 2
  • 11