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.
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.
IntelliSense based on TypeScript declaration files For example, JavaScript IntelliSense can be provided for values declared in a . d. ts file (see TypeScript documentation), and types such as interfaces and classes declared in TypeScript are available for use as types in JsDoc comments.
If you are unsure what version of TypeScript is currently active in your workspace, run the TypeScript: Select TypeScript Version command to check. You must have a .js/.ts file open in the editor to run this command. If you open a TypeScript file, the version appears in the lower right corner.
VS Code ships with excellent support for JavaScript but you can additionally install debuggers, snippets, linters, and other JavaScript tools through extensions.
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.
TypeScript and JavaScript Language Features
is a default built-in extension of VSCode. To disable it, do the following
@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.Workspace
i.e. current projectHere's a handy gif:
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With