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. --- lua/lspconfig/configs/gitlab_ci_ls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/configs/gitlab_ci_ls.lua b/lua/lspconfig/configs/gitlab_ci_ls.lua index e780f1b3..059aaf46 100644 --- a/lua/lspconfig/configs/gitlab_ci_ls.lua +++ b/lua/lspconfig/configs/gitlab_ci_ls.lua @@ -5,7 +5,7 @@ return { default_config = { cmd = { 'gitlab-ci-ls' }, filetypes = { 'yaml.gitlab' }, - root_dir = util.root_pattern('.gitlab*', '.git'), + root_dir = util.root_pattern('.git', '.gitlab*'), init_options = { cache_path = cache_dir, log_path = cache_dir .. '/log/gitlab-ci-ls.log', -- cgit v1.2.3-70-g09d2