Recently whenever I am coding specifically in Java and have a line of code like sysout, I keep getting the data type or variable before the actual code. Unable to backspace it as it seems to be an overlay without doing anything to the code. I've never had this picky issue before and am unsure if its been implented through vs code or its an extension I have. If anyone knows how I could get rid of the "x: " in line 4 of the image below then that would be great.
Thank you
Line 4 of code
This is a new vscode feature and has nothing to do with Java or any extensions. To get rid of it, put the following in your settings.json:
"editor.inlayHints.enabled": false
To open your settings.json, open the command palette and search for “settings” and click on Open user settings (JSON).
Related
My terminal in VS Code has since the previous update shown the word ERROR on every single line. I have installed oh-my-posh a little while back to make the terminal more pleasant to look at and give me some basic information.
Does anyone know where to look, to find the source of the error message? Tyvm :)
Update
Noticed something different when running echo $ as suggested by #kamen-minkov
When I booted Ubuntu up again and my VS Code opened from the previous state it was in the ERROR label was gone:
However. When I opened up a new tab it returned:
The only difference I can notice between the two is that there is a little, unfilled, circle/dot on the left side of the newly opened tab and not the one that opened up with VS Code. Is it some sort of debugger marking or something else? Could it be the source of the problem?
Apparently it's the Shell Integration decorations that's causing the hazards..
// settings.json
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.shellIntegration.decorationsEnabled": "never",
disable these settings and oh-my-posh error label will be gone :)
I am a new Flutter learner, and this is kinda annoy me, I think the "Problems" tab under is fully understand, I don't want to see warning next to my code. Is there a way I can disable or hide it? Thank you.
Hey, In visual studio code you can do minute changes.
Step1:
Press ctrl+shift+p , a command pallet will open
Step2:
Type settings.json and click on Open Settings (JSON)
a file will open
step3:
Add this lines in that
"editor.codeActionsOnSave": {
"source.fixAll": true
}
**After this whenever you save, const will be added automatically.
Note: Sometimes you might get error because after saving some widgets are prefixed with const but, sometimes when your values in widget get dynamic, there will be a error, so be careful.
disable this line or add source.fixAll to config.json
Perhaps you are using some vscode plugin like https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens to show code diagnostics.
Though that feature seems very useful to me incase you find that annoying you may disable it by going through your list of extensions.
I am trying to use Visual studio code to edit my Matlab .m file. After installation and setting of Matlab extension, I can write my m file now. The variables color markers are correct. But I found a problem about the "hints" or "prompts" of my code. I don't know the exact term of it. I just describe it in an example.
When I write some problematic code in Matlab editor, there would be a wavy red line under there. When my mouse cursor stay there, a message pops up, like invalid syntax at the end of the line. In the Vscode editor, there is wavy line, too. But it can't show the content of the prompts but only some rhombus symbols. There is a button Peek Problem under it. Sorry for lacking pictures here. I am trying to describe the problem in details.
I may need to change the settings but don't know how. Do I need more extensions? Any suggestions would be appreciate.
Following prompt of #nekomatic,
add "matlab.linterEncoding" : "gb2312" to the setting.json.
Today, I was watching a video tutorial. The tutor did a minor mistake in his code and while he was trying to find out what the mistake was, he hoverd over the code and exactly at the place, where his error was, VSCode popped up with an Error message like this:
Does any one know how can I activate this in my VSCode? Do I need to install an extension?
The setting is called "Editor > Hover: Enabled". You can search for it in the VSCode settings and make sure the box is checked to enable it.
this should be a built in feature but may need enabling it..
more info at
https://developercommunity.visualstudio.com/content/problem/249839/vs2017-1571-no-values-on-hover.html
How do I get rid of this underline? When I hover over it, it thinks it's a link and that I can cmd + click it to open it in browser. However, it's obstructing the view of actual underlines.
I'm specifically using Go's templating engine and vscode's basic HTML syntax because it's not supported.
I think I found a solution for your problem.
Add this code to your User Settings;
"editor.links": false
If you want to keep links clickable and just get rid of the underlines, I found a way:
open resources\app\out\vs\workbench\workbench.desktop.main.css
search for .monaco-editor .detected-link, and delete it.
Reopen VSCode, it will show some warning. Allow it and it's done.
After every update, you'll need to edit this file again.