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.
Related
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.
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.
On VS Code, I installed the prettier extensions, and since it doesn't support EJS, I added"prettier.disableLanguages": [ "ejs", ".ejs" ] to the setting.json file. This also shows up in the regular settings under Prettier: Disable Languages. Despite this, prettier keeps on re-formatting my EJS, which is super frustrating. How do I stop prettier from modifying a certain language besides this method?
Since Prettier knows nothing about EJS, it doesn't understand what you wrote in prettier.disableLanguages. Also VS Code considers .ejs files HTML. This not exactly accurate conclusion is passed to the Prettier extension, which in turn passes it to Prettier, so Prettier tries to format your files as pure HTML.
Try adding *.ejs to the .prettierignore file. You can read more about it here: https://prettier.io/docs/en/ignore.html
Your can add this
"[html]": { "editor.formatOnSave": false },
in your settings.json file in VSCode it will prevent auto formating html files, prettier still not have any ignore for .ejs files.
As .ejs files are still taken as html files by prettier.
In vim I can search for a visually selected string using a number of techniques including what can be found here:
http://vim.wikia.com/wiki/Search_for_visually_selected_text
Is there a way to do the same thing in VSCode with the Vim extension?
Right now, VsCodeVim doesn't support the command in search mode, so that keybinding isn't possible.
If you want to see that in the future, opening an issue at https://github.com/VSCodeVim/Vim/issues would help.
EDIT: https://github.com/bronson/vim-visual-star-search is implemented, so this functionality is now there.
I just trying to switch my editor from NetBeans to VSCode, however there is one feature which i missed from NetBeans and seem not exist at VSCode. I am not sure what is the name of the feature, i just call it "Scope mark line". The detail is like picture attached.
My question is, is there any plugins can bring that feature to VSCode? Please let me know if any, thanks in advance.
I also had a hard time searching for this feature, and found this VS Code Extension on the Marketplace: guides which adds various indentation guide lines. This worked for me editing ruby and bash files on osx.
Some of the tags for the extension:
guides indentation indentation guides ruler
From Default indent line guide in Visual Code?
Enable in settings.json:
"editor.renderIndentGuides": true