How to hide vs code file path in code tab [duplicate] - visual-studio-code

I don't know what I did or do but I'm pretty sure this wasn't there before. How do I get rid of it?

Solved it by removing the line "workbench.editor.labelFormat": "medium", in settings.json.
You could also do set it to default "workbench.editor.labelFormat": "default",

Related

python.defaultInterpreterPath in vscode shows as "unkonwn configuration setting"

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"
}

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"

Change line guide frequency in vscode

I have some dart code I am looking at in vscode.
The dart code uses 4 space indentation (literal 4 space, opposed to tabs).
When I view the code in vscode, it is putting line guides every two spaces. This doesn't make any sense since the indentation only occurs every 4 spaces. So it is essentially showing line guides to no where.
Observe the following screenshot
How can I fix this???
Go to Files > preferences > settings > select:Editor-Tab size You can change tab-size there.
Note: If you are using Eslint or Prettier make sure your editor settings are not overriding
The problem is that editor.tabsize setting is being overridden by language specific settings.
To fix I put the following in my user settings.json file...
"[dart]": {
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.detectIndentation": false
},

How to remove the red color indictors at the beginning of all the code?

When I updated Visual Studio Code, I am getting this annoying red indicator/highlighting before every line of code. Before the update, didn't have this issue. Does anyone know what is this and how to get rid of it?
I tried resetting and changing the theme but it didn't work.
I think this extension is causing your problem:
https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
Try to disable/uninstall the "Indent-Rainbow" extension if it is installed.
For the "Trailing Spaces" extension, you can disable the highlighting option by adding this line to the settings.json file.
{
"trailing-spaces.highlightCurrentLine": false
}
You can find more settings here:
https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces
I had the same problem and I thought it must be some extension causing this and so I took a deeper look at all my extensions.
In my case there was an extension called 'trailing spaces' which was causing this.
the red highlighting disappeared as soon as I uninstalled it.
Try doing the same and if it doesn't work try to take a look at all of your extensions. (An easier way to do that would be to go over the extensions tab on the left navigation bar in settings menu).
On the bottom bar, to the right, just beside the "Ln XX and Col XX" you can choose "Select Indentation" to indent using spaces or tabs. Change that configuration or choose "detect indentation from content" and will solve the red background.
I just had to change the tab size from 4 to 2 (as configured within my eslint setup)
I kept the Indent Rainbow extension, but added this to my settings.json to disable the red highlights:
"indentRainbow.ignoreErrorLanguages": [
"markdown",
"python"
For my case it was an extension called Bracket Pair Colorizer

Prevent Visual Studio Code from replacing tabs with spaces on save

My problem is not present while editing a file, like here: Spaces to tabs in Visual Studio Code
VSC converts all tabs to spaces when I save the file. How could I stop that stupid behavior?
This are my actual user settings:
{
"editor.insertSpaces": false,
"editor.detectIndentation": false
}
Further informations:
"editor.formatOnSave": false
Wish I understood more about what's happening here, but in my case, what finally worked (for now) was unchecking "Editor: Insert Spaces" in my user prefs. Without this, disabling Save on Format didn't seem to help. ¯\_(ツ)_/¯
I had an extension which overrides the default behaviour:
https://marketplace.visualstudio.com/items?itemName=lonefy.vscode-JS-CSS-HTML-formatter