visual-studio-code

Visual Studio Code MSVC C++ Compiler Not Working

天涯浪子 提交于 2021-01-29 10:12:10
问题 I have been trying to get Visual Studio Code to recognize the MSVC cl.exe compiler and build using it for the better part of a day now. I have tried two different methods (setting it up myself, and using VSCode add-on called Easy C++ projects to generate the code) of getting it up and running and both have failed in the same way, raising my suspicions that the point of failure might be somewhere out of my control. #include <Windows.h> int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE

VS Code: Can't load anaconda environment on Python Interactive

梦想的初衷 提交于 2021-01-29 09:49:01
问题 I am using VS Code in Windows 10. I am able to use the dependencies in my conda environment if I Run the Python Script in Terminal. However, I am not able to use the environment in the Python Interactive shell. For instance, I am using my datascience environment which has the package fuzzywuzzy . I have included the env path into the settings.json as the python.pythonPath . But the Python version used in the Jupyter Notebook is the default anaconda base C:\\ProgramData\\Anaconda3\\python.exe

VS Code terminal history search, Windows, Powershell

人走茶凉 提交于 2021-01-29 09:29:38
问题 since version 1.43 the ctrl+r r keyboard shortcut has stopped working for powershell history searches. Is there another way to search in recently used commands? 回答1: I can't reproduce your issue. But you could try this keybinding in the meantime: { "key": "alt+r", "command": "workbench.action.terminal.sendSequence", "args": { "text": "\u0012" } }, That sends a Ctrl + R to the terminal. Focus can be anywhere. That should trigger the reverse search of previous terminal commands. Does it do that

Why I have error overlapping range is not allowed?

二次信任 提交于 2021-01-29 09:25:29
问题 I am building formatter extension. Unfortunately I cannot find a lot of examples how to tackle simple tasks. This is my files Formatter provider and I try to capitalize some keywords. This works first time after extension refresh but not second time. What did I do wrong? 'use strict'; import * as vscode from 'vscode'; export class STFormatterProvider implements vscode.DocumentFormattingEditProvider { public out: Array<vscode.TextEdit> = []; provideDocumentFormattingEdits(document: vscode

How to turn on auto search on VS Code on macOs?

淺唱寂寞╮ 提交于 2021-01-29 08:57:52
问题 When using the Search functionality within Visual Studio Code on Windows, as I'm typing into the search textbox, it does autocomplete searching. On macOS, I have to hit the enter key for the search to happen. Is there a way to turn on autocompletion of auto search in VS Code on macOS? I'm currently on Big Sur. MBP 16" 2019. 回答1: Maybe you have the searchOnType setting set to false on your Mac. // Search all files as you type. "search.searchOnType": true, // When #search.searchOnType# is

VS Code shows module not found even though WebPack build works

懵懂的女人 提交于 2021-01-29 08:18:01
问题 My VS Code says that it can't find an import even though my WebPack build still works. Here is the import... import * as tf from '@tensorflow/tfjs'; and the message from VS Code: Cannot find module '@tensorflow/tfjs'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? I have read something about path aliases which can be set up in the tsconfig.json to shorten long paths to modules. But if this is a path alias and I don't have it configured in

VS Code Python extension Auto-complete Templates

醉酒当歌 提交于 2021-01-29 08:17:22
问题 I've recently switched from PyCharm to VSCode for my Python programming and am using Microsoft's own Python extension for VSCode. While most of the extension's auto-completes work great for me, some of the results are unwanted. For example, if I go into a class and write def , I get a few possibilities in the autocomplete popup. I select class method and the editor auto-completes to the following: def funcname(self, parameter_list): pass which is great, and also allows moving through funcname

Not looking for VS2013 npm install node modules

不羁岁月 提交于 2021-01-29 07:50:24
问题 I have a problem when ran command "npm install". I want install gulp and bower modules, but when i ran "npm install" or "npm install bower" I got an error VS2013. Why I got this error? How to solve this problem? below specified version I installed: node v10.15 npm v6.10.3 python v2.7 VSCODE v1.37.1 (user setup) I already add proxy on config: + npm config set https-proxy http://xxxxx + npm config set proxy http://xxxxx + npm config set registry="http://registry.npmjs.org/" + npm config set ca

VsCode extension - get list of dark/light themes

末鹿安然 提交于 2021-01-29 07:49:18
问题 Is it possible to get list of installed light/dark themes in extension programmatically. I want to make an extension that will switch next color theme on key command. 回答1: You can get all extensions and search for the ones that contribute a theme: vscode.extensions.all.forEach(ext => { console.log(ext.packageJSON.contributes.themes); } 来源: https://stackoverflow.com/questions/54772368/vscode-extension-get-list-of-dark-light-themes

How to show Flutter Widget documentation with Visual Studio Code IntelliSense?

走远了吗. 提交于 2021-01-29 07:39:11
问题 So, how can I show a Widget Documentation with VSCode auto complete? As we can see in this link, when hitting CTRL + SPACE with Android Studio and typing in a widget, it'll show its documentation. However, I couldn't find a way in Visual Studio Code to show a Widget documentation, only this. I know it's possible to hover the mouse over the Widget, but I don't want to read its doc after typing it, but instead, before. 来源: https://stackoverflow.com/questions/63350568/how-to-show-flutter-widget