VSCode's intellisense doesn't work after intellisense's auto-highlighting - visual-studio-code

After using intellisense to auto-complete some code, it often highlights some argument place holder text/value.
But while its highlighted, the intellisense stops working.
I have to click the esc key to get out the highlighting to continue using intellisense.
(if any of you use the macbook with the touch bar, you know how much effort it is to press the esc key đŸ¤®)
The highlighting might be hard to see, but its there the whole time I am typing "con"
Anyone know how get intellisense working without turning off the auto-highlighting feature?
(also anyone know the official/unofficial name of the highlighting feature?)

The issue was in VS Codes languages settings for Dart.
Changing the snippetsPreventQuickSuggestions setting to false will solve the issue.
can be global...
{
"editor.suggest.snippetsPreventQuickSuggestions": false,
}
or language specific...
"[dart]": {
"editor.suggest.snippetsPreventQuickSuggestions": false,
},

Related

How to get rid of automatic auto complete in VS code

I'm getting autocomplete without prompting for it by pressing any buttons, menu items, hint popups, or keyboard shortcuts.
I am not sure if it's due to some extension I added. I am new to coding and while this autocomplete is helpful, it wouldn't make me a better programmer. I was wondering how to turn off this setting in VSCode window.
I want them to be totally off.
For the most part, quick suggestions can be disabled for with the following config:
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
}
If you want to have different settings per language, you can do it like so (using C++ as an example):
"[cpp]": {
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
}
},
From your screenshot, it looks like you have these values set to "inline", which shows them as "ghost text".
Specifically for C++ (and perhaps for similar scenarios with other languages), the quick suggestions may still pop up after typing some characters such as the scope resolution operator (::), but most cases of it will be disabled with this (and I don't know how to fix those specific cases or why they happen (might be worth issue tickets with the tool maintainers)).
This allows you to still trigger autocomplete suggestions by pressing the registered keyboard shortcut. If you actually want to entirely disable intellisense for whichever programming language and extension you are using, that generally just means disabling/deactivating that extension, or using specific settings for that extension to disable intellisense.

How can I easily toggle display of problem underlining in VS Code editor panels?

I'm using VS Code with a number of different programming languages, which all have some form of problem validation provided via an extension. While these problem underlines are generally useful, I find them very annoying while I'm writing a particular piece of code, and only useful once I'm mostly done typing. I often think while writing code and I also tend to hit Ctrl+S very often, so there is no way that my IDE can "debounce" properly, as it wouldn't be able to tell if I'm done writing code or not.
How can I disable all lints from being displayed, regardless of the programming language used, until I re-enable them (or restart Code or whatever)?
I'm not looking for a always-hidden solution that permanently changes my settings. More for something that I can toggle with a keyboard shortcut or similar.
While I am most interested in a solution that works regardless of where the lints come from, the two extensions that'd be responsible for most of my lints are rust-analyzer and Kotlin, but I also have clangd and TexLab installed and also use TypeScript whenever I can't avoid it but currently I don't have any extension for it installed.
I don't think the exact thing you are looking for exists at the time of this writing.
I am not aware of any "global" (programming-language-agnostic) setting that toggles showing underlines for problems in the editor view. There is a setting that toggles showing decorations for problems in the files/folders view (problems.decorations.enabled), but that's not what you're looking for.
As shown by the answers to How to disable error highlighting in VS Code?, there are settings on a per-language basis to disable validation (such as css.validate, php.validate.enable, html.validate.*, json.validate.enable, etc. Note that language extensions may not follow that pattern of naming their settings fields)
In terms of getting a keyboard shortcut to toggle such a setting (whether the currently-non-existent-(I-think) programming-language-agnostic setting, or an individual programming-language-specific setting), see this Q&A: VSCode: Keyboard shortcuts for modifying user settings, where #matt-bierner points to the rebornix.toggle extension, which allows configuring keyboard shortcuts to toggle individual bi-state settings fields.
As for feature-requests and possible future features to VS Code, see this issue on the VS Code GitHub repo: Toggle problem visibility in Editor #166797. You can show your support for the feature reuqest by giving a thumbs up reaction to the issue. But please don't make a "me too" comment. "me too" comments generally come off as annoying to repo maintainers because they clutter up discussion and don't contribute anything of significant value.
Override theme colors in settings.json
{
"workbench.colorCustomizations": {
"[Visual Studio Light]": {
"editorError.foreground": "#00000000"
},
"editorError.foreground": "#00ff00"
}
}
will make errors transparent while using "Visual Studio Light" theme
and lightgreen while using any other theme, for example
Source: https://youtu.be/vR2y4VoCZg4?t=97
with the extension When File you can make the squiggles transparent when the file is dirty.
Add this to your settings.json file (global or workspace/folder)
"whenFile.change": {
"whenDirty": {
"editorError.foreground": "#ff000020",
"editorWarning.foreground": "#ff000020",
"editorInfo.foreground": "#ff000020"
}
}
File add a new line css. Lint dot empty rules and assign the value of ignore.

Suppress syntax function help popups in VS Code/VSCodium

I'm using VSCodium to write some Python, and using the Python/Intellisense/Pylance Extension and an annoyance is the constant pop-ups explaining every basic function to me.
For example if I start to type a print() statement it pops up a large box with all the syntax details of writing a print statement, which blocks my view of much of my code. I'd like to just be able to type without the big pop-up suggestions.
I tried under the Preferences > Settings > text editor and there are pages and pages of "suggest:" option check boxes there, and though I tried several, none helped. Not sure if that's the right place to look.
I tried to change the Quick Suggestions Delay to 5000ms but it seems to have no effect on that instant popup on typing print( as well.
I'm starting to think perhaps there is another set of settings that controls this, but there are so many and none seem to be making a difference.
I am using editor.quickSuggestions and editor.suggestOnTriggerCharacters turned off for that purpose:
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
},
"editor.suggestOnTriggerCharacters": false,
…and it works for me for languages I am using; not using Python at this point.

VSCode JavaScript syntax highlighting

I've recently returned to using VSCode after a long break. It seems that after updating, the syntax highlighting colours have changed to this:
From this:
Does anybody know how to achieve the look in the second image? I really can't stand the inconsistent brace colouring. If this isn't a change made in updates and I'm doing something wrong, please let me know
It appears you want to disable the bracket pairs colorization.
Here's a blog post from the VSCode team, talking about this new highlighting feature introduced recently : https://code.visualstudio.com/blogs/2021/09/29/bracket-pair-colorization
To do so, set the following settings to false :
"editor.bracketPairColorization.enabled": false,
"editor.guides.bracketPairs": false,

How can I stop VS Code Intellisense from automatically appearing?

When I'm not working in JavaScript, Intellisense is unfortunately not often terribly helpful. How can I make it only appear when I hit controlspace, and not just appear automatically?
I don't want to turn it off completely. I just want it to only appear when I explicitly ask it to.
Although the VS Code Intellisense documentation does not define "Quick Suggestions", apparently "quick suggestions" is Intellisense—or is the visible face of it. (Are there also slow suggestions? I have no idea. The name seems to suggest being just one aspect of Intellisense, but... it turns out that it seems to be pretty much the central thing.)
So to stop Intellisense from appearing uninvited, you have to turn off "quick suggestions". Here's how I did that, in my user settings:
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},