-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local configs = require 'lspconfig/configs' | ||
local util = require 'lspconfig/util' | ||
|
||
local function find_toml(startpath) | ||
return util.search_ancestors(util.path.dirname(startpath), function(path) | ||
local toml_file = util.path.join(path, "leanpkg.toml") | ||
if util.path.is_file(toml_file) then | ||
return toml_file | ||
end | ||
end) | ||
end | ||
|
||
configs.lean4ls = { | ||
default_config = { | ||
cmd = {"lean4", "--server"}; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mjlbach
Contributor
|
||
filetypes = {"lean4"}; | ||
root_dir = function(fname) | ||
return find_toml(fname) or util.find_git_ancestor(fname) or vim.loop.os_homedir() | ||
end; | ||
}; | ||
docs = { | ||
package_json = "https://raw.githubusercontent.com/leanprover-community/vscode-lean4/master/package.json", | ||
This comment has been minimized.
Sorry, something went wrong.
gebner
Contributor
|
||
description = [[ | ||
The Lean 4 language server is built-in with a Lean 4 install, | ||
and can be run with, e.g., "lean4 --server". | ||
This comment has been minimized.
Sorry, something went wrong. |
||
]]; | ||
default_config = { | ||
root_dir = [[find_toml() or root_pattern(".git") or os_homedir]]; | ||
}; | ||
}; | ||
} | ||
-- vim:et ts=2 sw=2 |
The executable name is
lean
, notlean4
.