diff options
| author | Aleš Brelih <ales.brelih@3fs.si> | 2025-08-22 04:14:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-21 19:14:23 -0700 |
| commit | 1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5 (patch) | |
| tree | 03cb2cafe10c621f9cdbd4badc602f2100020677 /lsp/gitlab_ci_ls.lua | |
| parent | fix(ts/js): support older Nvim 0.11.x (diff) | |
| download | nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.tar nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.tar.gz nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.tar.bz2 nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.tar.lz nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.tar.xz nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.tar.zst nvim-lspconfig-1c505a2a37c7732fb2a7e290c0f822abfb2ba1c5.zip | |
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.
Diffstat (limited to 'lsp/gitlab_ci_ls.lua')
| -rw-r--r-- | lsp/gitlab_ci_ls.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
