Skip to content

Commit 823e170

Browse files
committed
feat(lean3ls): do not use lspconfig.util
1 parent 46a25f6 commit 823e170

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

lsp/lean3ls.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
--- that plugin fully handles the setup of the Lean language server,
1515
--- and you shouldn't set up `lean3ls` both with it and `lspconfig`.
1616

17-
local util = require 'lspconfig.util'
18-
1917
return {
2018
cmd = { 'lean-language-server', '--stdio', '--', '-M', '4096', '-T', '100000' },
2119
filetypes = { 'lean3' },
@@ -32,11 +30,6 @@ return {
3230
end
3331
end
3432

35-
on_dir(
36-
util.root_pattern 'leanpkg.toml'(fname)
37-
or util.root_pattern 'leanpkg.path'(fname)
38-
or stdlib_dir
39-
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
40-
)
33+
on_dir(vim.fs.root(bufnr, { 'leanpkg.toml', 'leanpkg.path' }) or stdlib_dir or vim.fs.root(bufnr, '.git'))
4134
end,
4235
}

0 commit comments

Comments
 (0)