From 2008c5cebf2b84c5e5f8a566480b022ab2e7ebab Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 6 Feb 2022 03:13:56 +0000 Subject: [PATCH] docs: update server_configurations.md skip-checks: true --- doc/server_configurations.md | 14 ++++++++++++-- doc/server_configurations.txt | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/doc/server_configurations.md b/doc/server_configurations.md index 2307500afc..3b4340b2d5 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 2307500afc..3b4340b2d5 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,