From 5ce77de0dc7106c6f1460d80a3c5a51eaea3108c Mon Sep 17 00:00:00 2001 From: Niklas Gruhn Date: Sun, 15 Sep 2024 12:08:35 +0200 Subject: [PATCH] fix: Lean language server consuming excessive memory (#11683) The Lean process, spawned by the language server, might use excessive memory in certain situation, causing the entire system to freeze. See: https://github.com/leanprover/lean4/issues/5321 The language server accepts a CLI flag for limiting memory use. I set it to 1024MB, which might be a bit arbitrary, but definitly prevents the system from crashing. --- languages.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index cc437f78c..e115a4092 100644 --- a/languages.toml +++ b/languages.toml @@ -49,7 +49,7 @@ jsonnet-language-server = { command = "jsonnet-language-server", args= ["-t", "- julia = { command = "julia", timeout = 60, args = [ "--startup-file=no", "--history-file=no", "--quiet", "-e", "using LanguageServer; runserver()", ] } koka = { command = "koka", args = ["--language-server", "--lsstdio"] } kotlin-language-server = { command = "kotlin-language-server" } -lean = { command = "lean", args = [ "--server" ] } +lean = { command = "lean", args = [ "--server", "--memory=1024" ] } ltex-ls = { command = "ltex-ls" } markdoc-ls = { command = "markdoc-ls", args = ["--stdio"] } markdown-oxide = { command = "markdown-oxide" }