How to permanently disable pylance toast - visual-studio-code

VSCode 1.51.1
MacOS 10.15.7
I'm using the MS python extension. When I open python source code I get this toast:
Pylance extension is not installed. Click Yes to open Pylance installation page.
The project I'm working on uses python 2, which pylance does not support. I clicked on No in the toast. When I open another python file I still get notified to installed pylance.
Is there a way to disable this toast?

The Python Language Server used is determined by the setting python.languageServer
The 2 possible values are:
"python.languageServer": "Pylance"
"python.languageServer": "Microsoft"
If you change the setting to "Microsoft" it stops messaging about Pylance.
The setting can be in the global settings.json or the Workspace .vscode/settings.json
Edit
Recently 2 more options have been added
"python.languageServer": "Jedi"
"python.languageServer": "JediLSP"

Related

VScode Pylance python file path autocompletion

Recently I've installed pylance server (earlier I used Jedi), but it turned out that I have my file path autocompletion turned off. In Jedi it is out-of-box. How can I enable this option?
Jedi:
Pylance:
I tried setting up "python.analysis.include": ["${workspaceFolder}"], but it doesn't do a thing "python.analysis.indexing": true also useless
This is a feature only provided by Jedi. Pylance currently has no such feature.

Everytime I try to change the default version of my terminal, VSCode opens up instead

When i am trying to change the default terminal on my windows 11 laptop, the terminal opens up VSCode for some reason. I open the windows terminal, hit settings then VSCode opens up with this settings.json page:
VSCode settings.json
But the thing is I want to have the terminal settings open up, not VSCode. I am trying to change my default terminal from windows terminal to Ubuntu.
What version of Windows Terminal are you using? The settings UI for the Terminal was added in 1.7 (IIRC), and I believe the version that originally shipped with Windows 11 was 1.6. Before 1.7, clicking on "settings" would open the settings.json file in whatever your default .json editor was.
Future readers: If you're hitting this too, make sure to update your Terminal from the Store. Anything >=1.7 should have the Settings UI. At the time of this post, the latest Stable version in the store was 1.12.

VSCode open by itself new editor with settings.json

I don't know what happen, but I was working on VSCODE in windows adding neovim path to the settings.json.
I clicked inside the settings.json and vscode started to open new editor tabs by itself with the same content of settings.json.
I have uninstalled vscode several times, removed the Appdata roaming vscode, the Appdata local code, etc. I installed the vscode again and same behavior. I restarted my windows machine and same behavior.
The sync is on so the settings replicates to all my vscode installations. I started my Linux machine to see if this was something that replicated to my linux version. No, it is working normal.
I can work on VScode if I don't open the settings. It has open new editors (clones of settings) upto 500 hundred times.
I was able to stop it when I changed directory and it asked me if I wanted to close and all open tabs. The moment that I go to settings starts again.
You could start to not sync extentions. Maybe one is breaking it.
But You could also try to install an older version of vs code.
How to downgrade vscode

OmniSharp server is not running macOS 10.13.6

OmniSharp server is not running on my VS code. I tried with reinstall both VS code and C# extension powered by omniSharp, but it is still not running. I am working in a macOS 10.13.6.
So I do not get any error (red highlighting in case inaccurate code ) or in my code. Any advise how to solve this?
Reinstalling of an older version of C# extension solved my problem. Now OmniSharp is functioning fine.
I changed "omnisharp.useGlobalMono": "always" to "omnisharp.useGlobalMono": "never" in settings.json file and now it's working for me.
You can open the "settings.json" file from ctrl+p and type "settings.json" to opened window.
You can follow these steps:
Go to the VSCode settings (File > Preferences > Settings).
Search with the keywords omnisharp use global mono to locate the configuration.
Change the value to never from either auto or always.
REMEMBER to restart the VSCode to activate the change (I restarted it twice to be sure).

VS-Code installing omnisharp error unable to verify the first certificate

When attempting to install the Omnisharp Visual code extensions on my work machine, downloading the package fails and the extension does not install.
VS-Code version: 1.27.2
When I open a c# file the output window displays
Installing C# dependencies...
Platform: win32, x86_64
Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)'... Failded at stage: downloadPackages
Error unable to verify the first certificate
I haven't got a particularly detailed knowledge of my work's network and firewall setup but from reading around it is pointing towards that being the culprit.
The issue was fixed for me by updating my settings.json file.
This file can be edited by following these steps:
File -> Preferences -> Settings (or press 'Ctrl + ,' on a windows setup with default key mappings)
The settings page now appears. Underneath the settings search bar on the right hand side is a little '...' icon. Click that and choose 'Open settings.json'
Once you have the settings.json file open you need to add a new setting, which is this
"http.proxyStrictSSL": false
Now restart VS-code and open up a C# file and the extension should install sucessfully.
I found this information here : https://github.com/Microsoft/vscode-cpptools/issues/605
The original issue was about a different extension but it worked for me