aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2020-11-21 09:45:13 -0500
committerMatthieu Coudron <teto@users.noreply.github.com>2020-12-22 18:22:46 +0100
commitdbc4bf514198f9e328e200a9aa63b462d6e1e9f1 (patch)
treebf8afd68a9e134e417070cd518f05ebd394e5c0b /lua
parentMerge pull request #464 from mjlbach/feature/factor_out_autogen_doc (diff)
downloadnvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.tar
nvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.tar.gz
nvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.tar.bz2
nvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.tar.lz
nvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.tar.xz
nvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.tar.zst
nvim-lspconfig-dbc4bf514198f9e328e200a9aa63b462d6e1e9f1.zip
Have leanls use util.find_git_ancestor.
(Otherwise, the existing root_dir won't enable leanls for the normal style of lean package.)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/leanls.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/lspconfig/leanls.lua b/lua/lspconfig/leanls.lua
index cd6f4644..f74e4227 100644
--- a/lua/lspconfig/leanls.lua
+++ b/lua/lspconfig/leanls.lua
@@ -5,7 +5,9 @@ configs.leanls = {
default_config = {
cmd = {"lean-language-server", "--stdio"};
filetypes = {"lean"};
- root_dir = util.root_pattern(".git");
+ root_dir = function(fname)
+ return util.find_git_ancestor(fname) or vim.loop.os_homedir()
+ end;
};
docs = {
package_json = "https://raw.githubusercontent.com/leanprover/vscode-lean/master/package.json";
@@ -15,7 +17,7 @@ https://github.com/leanprover/lean-client-js/tree/master/lean-language-server
Lean language server.
]];
default_config = {
- root_dir = [[util.root_pattern(".git")]];
+ root_dir = [[root_pattern(".git") or os_homedir]];
};
};
}