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.
Related
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
When I code in typescript in vscode, I see the auto complete popup (as shown below) which is not very usefule. I think they are from another extension but I don't know which one gives me such suggestions. I still need auto-complete from my code.
Does anyone know which extension does this? How can I disable it?
To disable automatic suggestions when you type, set "editor.quickSuggestions": false. If you only want to disable this behavior in TypeScript files, instead add a language specific setting:
"[typescript]": {
"editor.quickSuggestions": false
}
If you want to disable all TypeScript support, search #builtin typescript in the extensions view and then disable the JavaScript and TypeScript Language Features Extension
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.
I want to get an overview of my code and would like to use a minimap in VS Code.
I did not find an option to set this up in the menus. I am using VS Code 1.9.
Starting with version 1.10 (Feb 2017) vscode supports minimaps.
You can switch this function on via the preferences. Just follow these steps:
open vscode
File
Preferences
Settings
On the right pane you see your own custom settings. There you can add the following settings:
// Controls if the minimap is shown
"editor.minimap.enabled": true,
If this is the first setting you need to surround this with curly brackets and remove the tailing comme. If you have already one or more please keep in mind this is JSON so you need to separate key:values with a comma.
Adding the following to settings.json will also highlight where you are on the map:
"editor.minimap.showSlider": "always"
Additionally, to render blocks instead of characters for better visualization in the Minimap:
"editor.minimap.renderCharacters":false
You have to update to version 1.10+ and add "editor.minimap.enabled": true to your user or workspace settings, which can be opened with Ctrl+,.
Since the questions is "how to configure it" I will give what I've found is the most useful configuration of the minimap feature.
This is how it looks in my editor:
This is effectively about 1/3 height and only the first 40 columns. But still just readable. It makes it so I can quickly grab the minimap slider and scrub through a file.
Here is my minimap config:
In current VS Code versions, you can simply enable and disable minimap under view->Show minimap.This is reference from Visual studio code version 1.55.2. This way we don't need to edit json settings file.
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