Skip to content

Commit 7ba101d

Browse files
committed
feat(agda_ls): do not use lspconfig.util
1 parent 064eb13 commit 7ba101d

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

lsp/agda_ls.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
---
55
--- Language Server for Agda.
66

7-
local util = require 'lspconfig.util'
8-
97
return {
108
cmd = { 'als' },
119
filetypes = { 'agda' },
1210
root_dir = function(bufnr, on_dir)
13-
local fname = vim.api.nvim_buf_get_name(bufnr)
14-
on_dir(util.root_pattern('.git', '*.agda-lib')(fname))
11+
on_dir(vim.fs.root(bufnr, function(name, _)
12+
local patterns = { '.git', '*.agda-lib' }
13+
for _, pattern in ipairs(patterns) do
14+
if vim.glob.to_lpeg(pattern):match(name) ~= nil then
15+
return true
16+
end
17+
end
18+
return false
19+
end))
1520
end,
1621
}

0 commit comments

Comments
 (0)