We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
lspconfig.util
1 parent 6663468 commit 251d82eCopy full SHA for 251d82e
1 file changed
lsp/gitlab_ci_ls.lua
@@ -7,16 +7,21 @@
7
--- `gitlab-ci-ls` can be installed via cargo:
8
--- cargo install gitlab-ci-ls
9
10
-local util = require 'lspconfig.util'
11
-
12
local cache_dir = vim.uv.os_homedir() .. '/.cache/gitlab-ci-ls/'
13
14
return {
15
cmd = { 'gitlab-ci-ls' },
16
filetypes = { 'yaml.gitlab' },
17
root_dir = function(bufnr, on_dir)
18
- local fname = vim.api.nvim_buf_get_name(bufnr)
19
- on_dir(util.root_pattern('.gitlab*', '.git')(fname))
+ on_dir(vim.fs.root(bufnr, function(name, _)
+ local patterns = { '.gitlab*', '.git' }
+ for _, pattern in ipairs(patterns) do
+ if vim.glob.to_lpeg(pattern):match(name) ~= nil then
20
+ return true
21
+ end
22
23
+ return false
24
+ end))
25
end,
26
init_options = {
27
cache_path = cache_dir,
0 commit comments