From 1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5 Mon Sep 17 00:00:00 2001 From: Aleš Brelih Date: Fri, 22 Aug 2025 04:14:23 +0200 Subject: fix(gitlab_ls): root dir ordering #4025 Problem: If project had a nested child gitlab file named: .gitlab-ci.yml it would take it as root. Solution: If inside GIT repository just use git repository root as root and still keep the option for .gitlab* as fallback if there is no git repo yet. --- lsp/gitlab_ci_ls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lsp/gitlab_ci_ls.lua') diff --git a/lsp/gitlab_ci_ls.lua b/lsp/gitlab_ci_ls.lua index a7e92865..d2f80ab4 100644 --- a/lsp/gitlab_ci_ls.lua +++ b/lsp/gitlab_ci_ls.lua @@ -17,7 +17,7 @@ return { filetypes = { 'yaml.gitlab' }, root_dir = function(bufnr, on_dir) local fname = vim.api.nvim_buf_get_name(bufnr) - on_dir(util.root_pattern('.gitlab*', '.git')(fname)) + on_dir(util.root_pattern('.git', '.gitlab*')(fname)) end, init_options = { cache_path = cache_dir, -- cgit v1.2.3-70-g09d2