Language Services
RustRover relies on TypeScript, Vue, Astro, Svelte, and other framework-specific language services to provide autocompletion, code analysis, and error highlighting.
Configure memory handling
Although RustRover strives at providing slick integration with language services, there may still arise out-of-memory errors induced by a language service rather than by RustRover itself.
Memory handling modes
When a language service runs out of memory, RustRover first attempts to restart it. After two sequential attempts fail, the language service stops and RustRover indicates the error in the Language Services widget on the status bar and displays a popup with an error message.
To prevent out-of-memory errors or have them solved seamlessly, thus ensuring stable operation of language services, you can configure memory handling in the following two modes:
Increase memory automatically
In this mode, RustRover automatically adds 1000MB when an out-of-memory error is to occur and restarts the language service in the background.
RustRover continues silently with this approach until the maximum memory limit of 25% RAM is reached, whereupon the language service stops and RustRover displays a popup with an error message.
For information on possible steps to improve the situation, refer to Troubleshooting.
Set memory limit
In this mode, you manually specify maximum memory a language service can use. Until this limit is reached, RustRover suggests adding 1000MB on each out-of-memory error.
When the specified limit is reached, the language service stops and RustRover displays a popup with an error message.
For information on possible steps to improve the situation, refer to Troubleshooting.
Configure memory handling for TypeScript language service
Open settings by pressing Ctrl+Alt+S and navigate to .
In the Language Services Memory area, choose the memory handling mode:
Select Automatically increase memory, if available to have memory increased and language services restarted silently.
Alternatively, select Set memory limit and specify the maximum memory to use by a language service.
If the specified memory size exceeds the available RAM, RustRover suggests an appropriate value in a tooltip.
Troubleshooting
An out-of-memory error occurs when a language service exceeds its allocated memory limit and can no longer handle the workload. This typically happens for the following reasons:
The project you are currently working with contains a large number of files and dependencies.
The maximum memory limit specified in the IDE settings is not enough for a language service.
Increase memory allocation
Open settings by pressing Ctrl+Alt+S and navigate to .
Select the Set memory limit option.
Increase the limit gradually, for example, from 4GB to 6GB and then to 8GB. Monitor the improvements.
Limit your project scope
Large projects with excessive files or dependencies can overload a language service. To reduce the load in large codebases, follow the recommendations from the performance guide provided by the TypeScript team, especially the sections Using Project References and Configuring tsconfig.json or jsconfig.json.
Upgrade or downgrade
Make sure you are using an up-to-date version of a language service.
RustRover is shipped with bundled versions of language services. However, newer versions of language services often include performance improvements. Therefore, it is recommended that you keep language services up to date.
To install the latest version of a language service, open the embedded Terminal (Alt+F12) and type one of the following depending on the language service and the package manager you are using:
npm install --save-dev typescriptor
pnpm add --save-dev typescriptor
yarn add --dev typescriptnpm install --save-dev @vue/language-serveror
pnpm add --save-dev @vue/language-serveror
yarn add --dev @vue/language-servernpm install --save-dev svelte-language-server typescript-svelte-pluginor
pnpm add --save-dev svelte-language-server typescript-svelte-pluginor
yarn add --dev svelte-language-server typescript-svelte-pluginnpm install --save-dev @astrojs/language-serveror
pnpm add --save-dev @astrojs/language-serveror
yarn add --dev @astrojs/language-serverIf an issue appeared after a language service update, consider downgrading to the previous version to confirm whether the problem was introduced by the update.
Submit an issue in the RustRover issue tracker
If the problem persists, submit an issue in the RustRover issue tracker and attach your project to it. This will help us reproduce and investigate the issue more efficiently.