Posts

Showing posts with the label visual-studio-code

Setting `GOPATH` for each vscode project

Setting `GOPATH` for each vscode project Setting the GOPATH variable global as an enviroment variable works fine with Visual Studio Code. GOPATH But setting a project specific variable globally doesn't seem very nice to me. Consider you have multiple Go projects, you would have to change this variable each time you, compile, debug, ... etc. a project. Go Is there a possibility to set the GOPATH variable as a project variable in Visual Studio Code? Ether in settings.json or launch.json ? GOPATH settings.json launch.json don't try to change GOPATH for each project, use vendor folder – n00dl3 Nov 21 '16 at 8:56 GOPATH vendor 4 Answers 4 Go 1.5 added the vendor directory that allows a per-project dependency management. If there is a source ...

Can't control 'tab' button behavior with 'C-M'

Can't control 'tab' button behavior with 'C-M' My problem is same as the follow issue I've tried 'c-m' for times and the tag toggled in the status bar, but it's always going to other windows in vscode so that I can't enter tab to move the cursor when I'm coding. I use 'vim' extension and I don't know if it matters. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

VS Code extension API - using complex command “workbench.action.quickOpen” that waits for user action before resolving the promise

VS Code extension API - using complex command “workbench.action.quickOpen” that waits for user action before resolving the promise I have a VS Code extension, and I'm trying to execute a VS Code command. The command I want to use is "workbench.action.quickOpen"; I want to use this command to navigate to a method IF it exists. I have the following code: await vscode.commands.executeCommand('workbench.action.quickOpen', '#MethodToNavigateTo'); The problem here is, the quick open tool will open, populate with the method name, but the promise will only resolve once an item has been selected manually by the user. Ideally what I want is to search for methods, if it exists, navigate to it, else, simply resolve the promise and do nothing. Is it possible to do this in a VS Code extension, or is there a workaround for me? For context, I want to use this for a cucumber-js extension, so you can navigate to step files from feature files. ...