Skip to content

Commit 3c1e1b6

Browse files
committed
feat(nomad_lsp): do not use lspconfig.util
1 parent 9f21483 commit 3c1e1b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lsp/nomad_lsp.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
---
1717
--- Description of your jobs should be written in `.nomad` files for the LSP client to configure the server's `root_dir` configuration option.
1818

19-
local util = require 'lspconfig.util'
2019
local bin_name = 'nomad-lsp'
2120

2221
if vim.fn.has 'win32' == 1 then
@@ -27,7 +26,8 @@ return {
2726
cmd = { bin_name },
2827
filetypes = { 'hcl.nomad', 'nomad' },
2928
root_dir = function(bufnr, on_dir)
30-
local fname = vim.api.nvim_buf_get_name(bufnr)
31-
on_dir(util.root_pattern '*.nomad'(fname))
29+
on_dir(vim.fs.root(bufnr, function(name, _)
30+
return vim.glob.to_lpeg('*.nomad'):match(name) ~= nil
31+
end))
3232
end,
3333
}

0 commit comments

Comments
 (0)