diff options
| author | github-actions <github-actions@github.com> | 2022-02-19 02:56:17 +0000 |
|---|---|---|
| committer | github-actions <github-actions@github.com> | 2022-02-19 02:56:17 +0000 |
| commit | 34bcbd82768e88c3b1121a8c8fb445dd2a13ec99 (patch) | |
| tree | ceac86699dd6e297e4fc2fa50c34afd4d011f61e | |
| parent | Merge pull request #1727 from Julian/leanls3 (diff) | |
| download | nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.tar nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.tar.gz nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.tar.bz2 nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.tar.lz nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.tar.xz nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.tar.zst nvim-lspconfig-34bcbd82768e88c3b1121a8c8fb445dd2a13ec99.zip | |
docs: update server_configurations.md
skip-checks: true
| -rw-r--r-- | doc/server_configurations.md | 23 | ||||
| -rw-r--r-- | doc/server_configurations.txt | 23 |
2 files changed, 30 insertions, 16 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md index 7c17adc8..0e436332 100644 --- a/doc/server_configurations.md +++ b/doc/server_configurations.md @@ -3979,19 +3979,26 @@ require'lspconfig'.leanls.setup{} cmd = { "lake", "serve", "--" } filetypes = { "lean" } 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 + 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 + use_lake_serve = true + end end end + if not use_lake_serve then + config.cmd = config.options.no_lake_lsp_cmd + end -- add root dir as command-line argument for `ps aux` table.insert(config.cmd, root_dir) end, + options = { + no_lake_lsp_cmd = { "lean", "--server" } + } root_dir = root_pattern("lakefile.lean", "lean-toolchain", "leanpkg.toml", ".git") single_file_support = true ``` diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt index 7c17adc8..0e436332 100644 --- a/doc/server_configurations.txt +++ b/doc/server_configurations.txt @@ -3979,19 +3979,26 @@ require'lspconfig'.leanls.setup{} cmd = { "lake", "serve", "--" } filetypes = { "lean" } 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 + 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 + use_lake_serve = true + end end end + if not use_lake_serve then + config.cmd = config.options.no_lake_lsp_cmd + end -- add root dir as command-line argument for `ps aux` table.insert(config.cmd, root_dir) end, + options = { + no_lake_lsp_cmd = { "lean", "--server" } + } root_dir = root_pattern("lakefile.lean", "lean-toolchain", "leanpkg.toml", ".git") single_file_support = true ``` |
