VSCode: User Snippets showing over path Intellisense - autocomplete

I'm trying to prioritize path intellisense over my user snippets, or just group them with other non-user snippets really. The current behaviour is user snippets -> paths -> other snippets as seen in the screenshot:
I need to navigate paths I don't know the structure but each level I have to scroll down to the suggestion and it's very annoying. I have disabled some snippets, but it's still annoying and it's not worth to turn off custom snippets just because of this.
Some settings I tried are "editor.snippetSuggestions": "inline" and "editor.quickSuggestions": { "strings": false" }. Also tried most popular path autcomplete extensions.
Am I the only one annoyed by this? Is this the default behaviour or did I messed up my config? Thanks in advance.

Related

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.

Snippets accept with tab but autocomplete disabled unless press ctrl+space

I would like to have autocomplete disabled (unless I press ctrl+space), but also I want to be able to create snippets that populate with tab. How can I have both of these at once?
I'm wondering if I understood you correctly. Here are my opinion, in my understanding.
As for creat snippets, the vscode docs have gien the solution: enter link description here. To simplify, Code -> Prefrences -> User snippets and then New Global Snippets file. Or you can see this question.
Besides, to disable autocomplete, there are several options:
"editor.autoClosingBrackets": false,
"editor.suggestOnTriggerCharacters": false,
"editor.acceptSuggestionOnCommitCharacter": false
...
each has different functions, you can also see the official docs, or I also found another question which may be helpful.
Hope useful.

Only show relevant intellisense suggestions in VSCode editor

This problem is difficult to explain.
In the image below, how do I get VSCode to only show adjL? I only want suggestions from the file I'm currently editing.
Currently, it shows a whole list of variables that I don't ever use.
See here: https://code.visualstudio.com/docs/editor/intellisense
Adding this to your setting.json should do it.
"editor.quickSuggestions": {
"other": false,
"variable": true
}
But I not recomended that, because intellisence is realy helpfull! ;)
Unless you only care about hiding other variables but not other types of prompts.

How do I disable suggestions for plain text documents in VScode?

I sometimes use VScode for plain text documents, however I'm constantly interrupted by suggestions to use particular words:
How can I stop this behavior for txt files? I would still like suggestions for code.
Via this VScode bug and various related bugs I've attempted the following:
"[txt]": {
"editor.quickSuggestions": false
}
However that does not stop the suggestions from happening.
Found the answer to this one myself, via this screenshot on a related bug - pasting it here to help others:
"[plaintext]": {
"editor.wordBasedSuggestions": false,
"editor.quickSuggestions": false
},
this worked for me:
command palette -> Preferences: configure language specific settings
under suggestions, go to Editor: Quick suggestions, and under the other item, change the value from on to off.
Note there were two other confusingly-named settings: Inline suggest: enabled and `Editor: Snippet suggestions". I had no idea what they meant, but they were not relevant here.

Visual Studio Code editor: Disable IntelliSense for CSS files?

I am using VS Code to write some CSS for an exercise. When I attempt certain Emmet shortcuts, for example many two letter ones like mt - margin-top, the IntelliSense prompt overrides Emmet. I could dismiss the prompt, but I'm trying to reduce keystrokes here.
Is there a way to disable IntelliSense for particular files or even files types? Or perhaps another solution I have not thought of?
I don't know if it's too late but I found the answer:
Put this in your settings.json:
"[css]": {
"editor.quickSuggestions": false
}
Normaly now, you wont get intelliSense suggestions in your .css files.