How can I disable `Initializing JS/TS Language Features` in a specific project?

I have a Laravel project developing it inside the Visual Studio Code. Also I have the front-end with Angular 8 in a separate project which also use VSC. I build the Angular project and push the build version inside the Laravel project.

Now when I am working on my Laravel project VSC shows Initializing JS/TS Language Features message all the time inside the footer and it heavily impacts the performance of my computer.

error picture in vsc

As I am using this feature in other projects, is there a way to disable this feature just in a specific project? In this case in my Laravel project.


Solution 1:

Disabling TypeScript and JavaScript Language Features built-in extension for a specific workplace helped to me (in my case the extension had been slowing down the performance of the machine and messing with autocomplete in React apps).

In your VSCode window:

Extensions (Ctrl + Shift + X) -> More Actions... -> Show Built-in Extensions -> Features -> TypeScript and JavaScript Language Features -> Disable (Workplace)

And reload your VSCode after that.

Solution 2:

TypeScript and JavaScript Language Features is a default built-in extension of VSCode. To disable it, do the following

  • Go to extensions view
    macOS: COMMAND (⌘) + SHIFT (⇧) + x
    Windows/Linux: CONTROL (⌃) + SHIFT (⇧) + x
  • Write @builtin in the search box and then search for the extension you'd want to disable, e.g. in your case TypeScript and JavaScript Language Features — now you can disable it.
  • I recommend only disabling it for your current Workspace i.e. current project

Here's a handy gif:

built in extension disable vscode

Solution 3:

Disabling Language Features for TS and JS will work, but you'll also lose other features (pre-compile type checking, validating, etc.). The specific problem is due to the delay in executing Code Actions and isn't directly related to TS.

Yes, disabling Language Features will solve the problem, but you can target the root cause and keep the language features active!

In the user settings you want to disable "editor.codeActionsOnSave" for any particular features that are slowing you down. In my case, it was ESLint automatically fixing code actions on save; from my settings.json:

"editor.codeActionsOnSave": {
    "source.fixAll.eslint": false
},

Disabling this let me keep language features enabled, but removed the conflict (Prettier was formatting my code on save, ESLint was fixing issues on save, and together there was a slowdown).