aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/server_configurations.md14
-rw-r--r--doc/server_configurations.txt14
2 files changed, 24 insertions, 4 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md
index 2307500a..3b4340b2 100644
--- a/doc/server_configurations.md
+++ b/doc/server_configurations.md
@@ -3975,9 +3975,19 @@ require'lspconfig'.leanls.setup{}
Commands:
Default Values:
- cmd = { "lean", "--server" }
+ cmd = { "lake", "serve", "--" }
filetypes = { "lean" }
- on_new_config = function(config, root_dir)
+ on_new_config = function(_, d, _)
+ lake_version = table.concat(d, '\n')
+ end,
+ stdout_buffered = true,
+ })
+ if lake_job > 0 and vim.fn.jobwait({ lake_job })[1] == 0 then
+ local major = lake_version:match 'Lake version (%d).'
+ if major and tonumber(major) < 3 then
+ config.cmd = legacy_cmd
+ end
+ end
-- add root dir as command-line argument for `ps aux`
table.insert(config.cmd, root_dir)
end,
diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt
index 2307500a..3b4340b2 100644
--- a/doc/server_configurations.txt
+++ b/doc/server_configurations.txt
@@ -3975,9 +3975,19 @@ require'lspconfig'.leanls.setup{}
Commands:
Default Values:
- cmd = { "lean", "--server" }
+ cmd = { "lake", "serve", "--" }
filetypes = { "lean" }
- on_new_config = function(config, root_dir)
+ on_new_config = function(_, d, _)
+ lake_version = table.concat(d, '\n')
+ end,
+ stdout_buffered = true,
+ })
+ if lake_job > 0 and vim.fn.jobwait({ lake_job })[1] == 0 then
+ local major = lake_version:match 'Lake version (%d).'
+ if major and tonumber(major) < 3 then
+ config.cmd = legacy_cmd
+ end
+ end
-- add root dir as command-line argument for `ps aux`
table.insert(config.cmd, root_dir)
end,