python.defaultInterpreterPath in vscode shows as "unkonwn configuration setting" - visual-studio-code

The old python.pythonPath has been deprecated in the latest vscode 1.64.1 and replaced by python.defaultInterpreterPath. However, when I set it in projectname/.vscode/settings.json, it is greyed and shown a popup as:
unkonwn configuration setting
This still persists even after restarting vscode.
Anyone can shed some light on this issue?
Thanks

It may be solved now, or just remember to avoid using the "settings" key again, within a settings.json file, but a single dict, eg:
{
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
}

Related

How to avoid VSCode from overwriting workspace settings while have settings sync on

I have (builtin) settings sync on in VSCode. For various workspaces I use the the workspace settings to give titleBar of each workspace a different color for easy recognition. However everytime I re-open a workspace (for which I set workspace settings for titleBar colorCustomizations) VSCode tries to overwrite the values in workspace settings.json into the ones used in user settings.json.
Example the workspace settings.json I set for the workspace:
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#f558be",
"titleBar.activeForeground": "#ffffff",
"titleBar.inactiveBackground": "#f424ac",
"titleBar.inactiveForeground": "#cccccc",
"editorGhostText.border": "#d94e4e",
"editorGhostText.foreground": "#b95454",
},
}
Which at re-opening are overwritten and thus changed into:
{
"workbench.colorCustomizations": {
"editorGhostText.border": "#d94e4e",
"editorGhostText.foreground": "#b95454"
},
}
I tried setting:
"settingsSync.ignoredSettings": [
"workbench.colorCustomizations"
],
in User settings, but that seems only works on user settings, as it does not solve my issue. The settingsSync.ignoredSettings, which might solve my issue, can not be set on Workspace settings.
I tried adding vscode/ or vscode/settings.json to the .gitignore file of my project, but issue remains.
How can I avoid VSCode trying to overwrite my workspace settings?
According to the documentation Settings precedence "later scopes override earlier scopes", and Workspace comes after User.
Values with Object type are merged – like workbench.colorCustomizations then:
If there are conflicting values, such as editor.selectionBackground in the example above, the usual override behavior occurs, with workspace values taking precedence over user values, and language-specific values taking precedence over non-language-specific values.
Does the problem go away if you disable Sync?
Are you using the latest version of VS Code?
Turns out I have installed an extension which already deals with UI colors called Peacock. It overrides the workspace settings. When I disable it the issue is gone. It looks nice actually, so better just start using it.

Why "markdown.styles": [] setting disappeared in VS Code?

I could not find this setting by searching for "markdown styles" in the Settings page.
I am wondering if I lost the VS Code built-in markdown extension. Please see the image below, which shows what my search should've returned.
When I tried to add this setting to the settings.json file (another way to set the markdown style), "Unknown Configuration Setting" showed up as I hovered on it.
Unknown Configuration Setting:
I have tried resetting the settings.json file, reinstalled any relevant markdown extensions and even reinstalled VS Code, but it is still not working.

Cannot disable language "keyword" suggestions in VSCode with "editor.suggest.showKeywords": false

I have been trying to disable the keyword popup in VSCode, but the suggested method of adding "editor.suggests.showKeywords": false, doesn't work, as suggested in this post.
This is how it looks in my settings.json file, along with some other attempts that also haven't worked, commented out.
Any ideas on how to disable this?
I got it to work. I had the Pylance extension installed. By setting the languageServer to jedi, and switching to the following, I fixed the issue:
"Pylance": "python.languageServer": "Pylance"

why there is no selection when I click F5 to run program in vscode

In the begin, for example, I'd like to run program by click F5, and there is a selection box on the top of vscode. However, maybe I click some errorly, it debug directly, and no selection here, and the terminal shows (base) in the front of result, why and how to correct to original setting?
One way to reset VS settings as follows:
Note: Please use save as to backup settings.json in case you have something that you may need to restore later.
DO NOT DELETE ANYTHING FROM YOUR "defaultSettings.json"
These instructions are only for clearing out everything except {
} within your user settings.json:
The easiest way to reset VS Code
back to the default settings is to clear your user settings.json file
contents in the Settings editor. Delete everything between the two
curly braces, save the file, and VS Code will go back to using the
default values.How can I reset my user settings?
If following above does not resolve your issue, please consider adding a screenshot of the issue along with your posted question and/or add default settings.json, so it can be compared with a working default settings.json file for your assistance.

vscode "applying code action organize Imports"

Currently got an annoying issue with VS and saving ts files.
every time I save a ts file I get a little popup in the bottom right telling me its "applying code action organize Imports".
I've tried uninstalled VSCode, removing all extensions, deleting the code folder in Roaming. As far as I can tell all my user settings are blank and it should be back to a clean install of VSCode. I've tried looking in the settings for something similar, even adding this to my settings.
{
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
}
However, I'm still getting the same message on save and its restructuring the imports.
I've got vs code installed on another 2 machines and don't get the same issue.
Any ideas?
Turns out the folder I was opening had its own custom .vscode folder with its own settings.json which had the organizeImports setting enabled. So no matter what I did to my local settings file this one was always overriding it and nothing was showing up within VS directly.
I had forgotten to select a Python interpreter in vscode. Once I did this, the pop up on bottom right telling saying its "applying code action organize Imports" stopped appearing. This solved it for me.