Repository navigation
Disabling the integrated LanguageTool server ? #247
|
Greetings, Is it possible to disable the integrated LanguageTool server when using HTTP mode? I'm already running a language server externally and would like to avoid launching the instance bundled with the extension, as it appears to consume roughly 1 GB of memory. I haven't been able to find an option to prevent the integrated server from starting. Is this currently supported? Any help would be greatly appreciated. Thanks! |
Replies: 1 comment 1 reply
|
When ltex.languageToolHttpServerUri is set, no bundled LanguageTool instance is started. In ltex-ls-plus's SettingsManager.reinitializeLanguageToolInterface(), the in-process LanguageToolJavaInterface is only created when that URI is empty. Otherwise it uses LanguageToolHttpInterface, which only sends requests to your server. The Java process you still see is ltex-ls-plus itself. It's the language server the extension talks to, so it can't be turned off. Its memory is mostly the JVM heap, and you can cap that: "ltex.languageToolHttpServerUri": "http://localhost:8081", "ltex.java.maximumHeapSize": 512 ltex.java.maximumHeapSize (default 2048) is passed to Java as -Xmxm when the server is launched. Lower it as far as your setup tolerates. Restart VS Code after changing it. |
When ltex.languageToolHttpServerUri is set, no bundled LanguageTool instance is started. In ltex-ls-plus's SettingsManager.reinitializeLanguageToolInterface(), the in-process LanguageToolJavaInterface is only created when that URI is empty. Otherwise it uses LanguageToolHttpInterface, which only sends requests to your server.
The Java process you still see is ltex-ls-plus itself. It's the language server the extension talks to, so it can't be turned off. Its memory is mostly the JVM heap, and you can cap that:
"ltex.languageToolHttpServerUri": "http://localhost:8081", "ltex.java.maximumHeapSize": 512
ltex.java.maximumHeapSize (default 2048) is passed to Java as -Xmxm when the server is la…