I am doing leetcode exercises on vscode, using this extension:
However vscode keeps sending error notifications about the golang codes written locally lack of main module
How can I disable vscode error notifications? As those golang codes are used to run remotely, so there are no needs to compile locally
Check first if you can disable the Go extension, just for your current (leetcode) workspace.
If you don't want to permanently remove an extension, you can instead temporarily disable the extension by clicking the gear button at the right of an extension entry.
You can disable an extension globally or just for your current Workspace.
You will be prompted to reload VS Code after you disable an extension.
By disabling it just for the workspace, you can still use Go for Go projects in a separate workspace in the same VSCode.
Related
I have tried everything that has been written about uninstalling extensions but I really prefer to download a complete clean copy of VScode and start again. Is that possible or do I have to sign in under another email? Totally new to all this and have mucked up my copy!
I asume you would like to have your VScode in default clean state same as it was first installed?
Then after uninstall remove remaining folders or use some app which will look for all folder settings for you and remove them...
or just delete
%userprofile%\AppData\Local\Programs\Microsoft VS Code
%userprofile%\AppData\Roaming\Code
%userprofile%\.vscode
A lot about reseting VScode to default is here: How to reset settings in Visual Studio Code?
Title says it all. I open a test file. Type $package.. Nothing comes up. It's not a delay issue. It's not an empty package. How do I get intellisense to turn on?
Update: I've open a bug ticket with the VSCode-Golang team. As we find more information, I'll report back here. https://github.com/Microsoft/vscode-go/issues/2278
I'm not sure as to the whys and the wherefores, but the solution was to reinstall all of the Go tools in VSCode. Look for "Go: Install/Update Tools". I selected them all. Once they installed,restart VScode. At this point autocomplete turned on.
I didn't remember a VSCode update before things broke. If you run into this issue, try reinstalling the tools within VScode.
Be sure your opened go file, the one you try to edit, is part of the open project folder in vs-code, otherwise the auto-completion will not work properly. If you want to edit file from other module it's better to open the module folder in other instance of vs-code and edit it from there.
If the intellisense was already working and suddenly stops, you may try any of the below or both to resolve this.
Reset the VisualStudio settings as explained here. https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/ms247075(v=vs.90)
Delete the .VS folder from your project.
How can I run a make build on save in VS Code on save event?
I can see that I can do something like the following.
{
"go.buildOnSave": "workspace"
}
I guess the lack doc. is be cause it is just basic VS Code - on setting a command.
How can I run a make build on save in VS Code on save event?
The Build, Lint and Vet of the VSCode Go extension from Microsoft (v1.26) currently based on go build. You can choose the preset option for package (default), workspace, or off. See vscode-go/goBuild.ts
If you would like to have a custom build i.e. make build on your workspace, you can set VSCode Custom Tasks instead.
Visual Studio Code (0.3.0 - 0.7.0) defaults to opening files in a new window, so if you double-click a file in the project view in Unity, or any log in the console, it will open a new window rather than opening the file in an existing window you already have open.
Visual Studio Code (0.5.0 - 0.7.0) will open a file in an existing window if you pass it the command line arg -r, however Unity will not let you customize command line arguments on OSX, it's a Windows-only feature.
Is there a way to open files from Unity into an existing window in Visual Studio Code (0.3.0 - 0.7.0)?
There is a way, but it's a pain. Create a shell script that calls Visual Studio Code and passes it the file path that Unity provides:
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron" -r -g $1
exit 0
Then you need to make an .app from that shell script. I used a program called Platypus to make the .app. If you use Platypus make sure to check the 'Accepts Dropped Items` checkbox, it didn't work for me until I used this option.
Once you have the .app created you need to set that app as your External Editor in Unity.
Hopefully in the future Unity will allow custom arguments to be sent for OSX, not just Windows. Also it would be nice if Unity passed the line and column numbers to custom external editors, currently those details are only passed to certain Unity-recognized editors. There is really no reason I can think of that why they could not pass that information as additional arguments. Because that information isn't being passed that means you cannot configure this script to open up the file to line that an error might be on, which is a bummer.
Also, this entire answer would be unnecessary if the Visual Studio Code team would just add an option in the preferences to default to opening files in the existing window instead of defaulting to a new one. There are a couple of feature requests listed on their site for this currently, here's one: http://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/8740771-persistant-option-to-open-files-in-existing-window
Hi you can get full debugging support in VSCode for Unity using this plugin
https://github.com/dotBunny/VSCode
VS Code in Unity
This plugin works on both MacOS and Windows and gives you the following capabilities:
•An option to enable VS Code integration (Editor –> Assets –> Enable Integration), this updates your solution files and (more importantly) keeps them in sync. This also sets the preferred external tool editor in the Unity preferences.
*Note, the old “Sync MonoDevelop” option is now gone in the Unity editor from V5.2
•It writes out the necessary (and sometimes hard to find) VS Code configuration files, including the ability to hide “non-code” files in the editor (hides things like .sln, .csproj and the ever present unity .meta files)
There are a couple of other settings in there to help speed up the integration.
•Automatically launches VS Code direct to your project folder, EVERY-TIME. no longer do you have to worry about keeping that window open, or switching around if you work on multiple projects
One thing to be aware of, once you enable the VSCode integration, changing your preferred code editor in the External Tools preferences will have no effect as the plugin takes over opening code files.
Am I the only person having problems with this plugin in Sublime Text 3? I cloned it from github repo, and when I try to start chrome's remote debugging via Sublime's command pallete, the new instance of chrome is being opened but the file is not being opened. Did anybody made this plugin to work is ST3? Thanks in advance
Before working with Web Inspector plugin, properly exit chrome.
In chrome use Ctrl+Shift+Q
First, make sure you are using the ST3 branch of the github repo, and have run git pull as there have been some changes in the last few hours and days. Also, make sure you read completely through the Getting Started section of the README. It looks like you need to manually open your application's URL in Chrome after you've started it via Sublime using CtrlShiftR - you can't use an already-running Chrome session. You can then hit CtrlShiftR again and choose "Start debugging", then choose the correct tab from the list.
If you're still having issues, I'd fill out a detailed issue on Github and let the developer know what's going on. Make sure you include all the steps you've followed, and the complete text of any error messages that may appear in the Console (Ctrl`).