VSCode: How to run a command after each terminal open?

On Linux systems you should use: “terminal.integrated.shellArgs.linux” On Windows and OSX: terminal.integrated.shellArgs.windows and terminal.integrated.shellArgs.osx respectively. If you want to apply shellArgs setting on a per-workspace basis – you can, despite the fact that documentation says: The first time you open a workspace which defines any of these settings, VS Code will warn you and subsequently … Read more

How to run a system command from VSCode extension

Your extension environment has access to node.js libraries, so you can just use child_process or any helper libraries to execute commands: const cp = require(‘child_process’) cp.exec(‘pwd’, (err, stdout, stderr) => { console.log(‘stdout: ‘ + stdout); console.log(‘stderr: ‘ + stderr); if (err) { console.log(‘error: ‘ + err); } });

Command not found in VSCode extension

You need to add all registered commands to the activationEvents list in package.json so that they are available on invocation. Update your package.json as such: { … “activationEvents”: [ “onCommand:extension.openMyExtension”, “onCommand:extension.useMyExtension” ] … } You can find more details on activation events in the official VSCode Documentation.

rust-analyzer failed to discover workspace in vscode

I guess you don’t have a Cargo.toml file in your project? The rust-analyzer needs a Cargo.toml to detect the workspace. You could create a new rust project with cargo: cargo new your-project cargo will help you create a Cargo.toml file automatically, or you could manually create a Cargo.toml for your existing project. If this issue … Read more

How to trigger documentation popup in vscode

This is the editor.action.showHover command. It is bound to cmdk cmdi by default. Note: Shortcut works by holding down the cmd [ctrl in windows], then while holding press k then i You can change the keyboard shortcut with a keybinding such as: { “key”: “cmd+k ctrl+space”, “command”: “editor.action.showHover”, “when”: “editorTextFocus” }

TSLint extension throwing errors in my Angular application running in Visual Studio Code

Like Tuấn Nguyễn described, you need to: Go to the Command Palette by pressing Ctrl + Shift + P, In the input that pops up at the top of the Visual Studio Code, start typing TSLint: Manage workspace library execution” and hit the Enter key. From the menu that replaces the input, pick enable workspace … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)