Skip to content

Commit 45ae270

Browse files
committed
feat(unison): do not use lspconfig.util
1 parent e429c34 commit 45ae270

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lsp/unison.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
---
33
--- https://github.com/unisonweb/unison/blob/trunk/docs/language-server.markdown
44

5-
local util = require 'lspconfig.util'
6-
75
return {
86
cmd = { 'nc', 'localhost', os.getenv 'UNISON_LSP_PORT' or '5757' },
97
filetypes = { 'unison' },
108
root_dir = function(bufnr, on_dir)
11-
local fname = vim.api.nvim_buf_get_name(bufnr)
12-
on_dir(util.root_pattern('*.u')(fname))
9+
on_dir(vim.fs.root(bufnr, function(name, _)
10+
return vim.glob.to_lpeg('*.u'):match(name) ~= nil
11+
end))
1312
end,
1413
settings = {},
1514
}

0 commit comments

Comments
 (0)