Visual Studio Code doesn't insert snippet - visual-studio-code

I have installed Reactjs code snippets code snippet extension.
Snippets used to work Until I installed PHP Storm Keymap extension.
In a JSX (or JS) file when I try to add snippet the editor converts it to a tag instead of completing the snippet. ( It will convert rcc to <rcc></rcc> instead of completing snippet.)
I checked my Keyboard Shortcuts both, exmpandAbbreviation and insertSnippet are set on tab I tested changing insertSnippet to other keybinding but it still doesn't work.
Any thoughts?

Apparently adding
"editor.tabCompletion": true
to settings.json solves the problem.

I went to my setting.json file and had to delete this line
"editor.snippetSuggestions": "none",
and that worked.

Related

Why "markdown.styles": [] setting disappeared in VS Code?

I could not find this setting by searching for "markdown styles" in the Settings page.
I am wondering if I lost the VS Code built-in markdown extension. Please see the image below, which shows what my search should've returned.
When I tried to add this setting to the settings.json file (another way to set the markdown style), "Unknown Configuration Setting" showed up as I hovered on it.
Unknown Configuration Setting:
I have tried resetting the settings.json file, reinstalled any relevant markdown extensions and even reinstalled VS Code, but it is still not working.

VS Code showing "type/arguments" in editor as labels

I just installed VS Code 1.60.0-insider.
At first I thought it was a bug, but now there are type/arguments hinds/labels in the editor:
(predicate:, callbackfn:, etc.)
How is this called and how to disable it? I searched online but couldn't find any information.
Note: they only appear in TypeScript files.
try use this instruction inside of settings.json, this working well for me.
"editor.inlayHints.enabled": false

VS code doesn't gray out unused variables

As far as I know it seems this is the setting you enter in your settings.json to enable unused variables & imports that aren't used to appear grayed out.
"editor.showUnused": true,
I do get an underline and if you hover I get an underline and message on hover.
What am I missing?
In my settings.json apparently I commented that the following did the trick.
"javascript.validate.enable": true,
/* this controls having your unused imports or variables to appear grey */
* builtin language features extension solution:
I am adding this just in case someone gets stuck like me. I had the same issue and the following was the problem.
vscode has #builtin extensions. One of them is typescript and javascript language features. If it is disabled the features will not work. So just go to extension and search #builtin typescript and javacsrtipt language feature`, click the cog icon and enable the extension.
September 2020
For me, adding "editor.showUnused": true, in settings.json in the .vscode directory worked.
In my case deno extension was causing the problem. disabling it seems to fix the issue.

Visual Studio Code auto indent in JSX

Let's say I have this code in .jsx file:
Now if I type, for example, BrowserRouter and hit Tab I got this state which is still ok:
But now when I hit Enter, I have this state:
How do I make it work like in .html files that pressing Enter adds two new lines and makes auto indentation? Like that:
I have VS Code v1.20.1 and my preferences which could be related to this issue are as follows:
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
}
I've searched through Github issues of VS Code and seems like it was fixed about half a year ago and should work now, but for some reason it's not. Also I've run VS Code with --disable-extensions flag for this so it's not an extension problem.
I've also found that it seems not to work for top-level tag only. For anything inside it the indentation works like in .html files. Strange.
Thank you.

VSCODE inserting spaces via format on save

VSCODE seems to be inserting spaces everywhere in my html code. I checked the settings and it's the following which is causing it: "editor.formatOnSave": true
Example:
How do I configure this to stop inserting spaces?
I have the following set :
"editor.formatOnSave": false,
"editor.insertSpaces": false
Now it is not inserting spaces. Hope it helps
Mine was caused by an extension JS/ CSS formatter, after i uninstalled and restart vscode works great.
After spending hours wondering why my django static links are broken smh
When saving, Visual Studio inserted a lot of spaces. This happened after an update of Visual Studio. This problem was because of an extension called Bracket Pair Colorizer. What I did was, uninstall and reinstall, and that solved the problem. I suggest to check all your extensions. It could be one of them.
I disabled the option of HTML formatting and no more space when saving files.
Settings > Extensions > HTML > Format: Enable
Enable/disable default HTML formatter.
What was the case with me is that I had the option Editor: Format on save mode to be set to file, this in combination with format on save would mean VS Code will try to format the entire file, resulting in spaces as defined in the formatter.
Change this to be modifictions, and VS Code will only save the lines you have made changes in.