Skip to content

Commit

Permalink
docs: update server_configurations.md
Browse files Browse the repository at this point in the history
skip-checks: true
  • Loading branch information
github-actions committed Feb 6, 2022
1 parent c6e2321 commit 2008c5c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions doc/server_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 12 additions & 2 deletions doc/server_configurations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2008c5c

Please sign in to comment.