We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
lspconfig.util
1 parent 9f21483 commit 3c1e1b6Copy full SHA for 3c1e1b6
lsp/nomad_lsp.lua
@@ -16,7 +16,6 @@
16
---
17
--- Description of your jobs should be written in `.nomad` files for the LSP client to configure the server's `root_dir` configuration option.
18
19
-local util = require 'lspconfig.util'
20
local bin_name = 'nomad-lsp'
21
22
if vim.fn.has 'win32' == 1 then
@@ -27,7 +26,8 @@ return {
27
26
cmd = { bin_name },
28
filetypes = { 'hcl.nomad', 'nomad' },
29
root_dir = function(bufnr, on_dir)
30
- local fname = vim.api.nvim_buf_get_name(bufnr)
31
- on_dir(util.root_pattern '*.nomad'(fname))
+ on_dir(vim.fs.root(bufnr, function(name, _)
+ return vim.glob.to_lpeg('*.nomad'):match(name) ~= nil
+ end))
32
end,
33
}
0 commit comments