Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable HTML autocompletion in VSCode?

As I type const someVariable = someArray[0], when I push enter, VSCode automatically converts the whole line to:

const someVariable = <someArray 0=""></someArray>

like image 639
TIMEX Avatar asked Aug 17 '19 08:08

TIMEX


People also ask

How do I enable autocomplete VSCode in HTML?

If HTML tags autocompleting issue is on JavaScript files, then you just need to change "select language mode" from "JavaScript" to "JavaScript React". Show activity on this post. Press Ctrl + Shift + P to open the command. Then, type Change Language Mode an select HTML or any other desired language.

How do I turn on autocomplete in Visual Studio?

The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space . If necessary, you can always return to the Visual Studio's native's IntelliSense. To do so, select Visual Studio on the Environment | IntelliSense | General page of ReSharper options ( Alt+R, O ).


1 Answers

"emmet.excludeLanguages": ["typescriptreact"] // or whatever languages you want to exclude

like "emmet.excludeLanguages": ["javascript"]

Which will stop emmet from working at all in those languages you specify.

Or you can also try:

"[typescriptreact]": {
   "editor.acceptSuggestionOnEnter": "off"
}, 

or

"[javascript]": {
   "editor.acceptSuggestionOnEnter": "off"
},

together with

"emmet.showExpandedAbbreviation": "never",

to keep emmet features in your language but disable seeing the abbreviation and accepting it on enter.

like image 94
Mark Avatar answered Oct 04 '22 19:10

Mark