diff options
| author | Crashdummy <Simon.Schwendele@gmx.de> | 2025-01-21 01:12:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-20 16:12:36 -0800 |
| commit | 71eac2ab32b22bf6c2b430632761e5d1930fe81e (patch) | |
| tree | 2faa19b77f1fe84c4897bd2b4c7d0065ae0b1cb7 /lua | |
| parent | refactor: comment util.path.is_descendant to prepare deperecation in future (diff) | |
| download | nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.tar nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.tar.gz nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.tar.bz2 nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.tar.lz nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.tar.xz nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.tar.zst nvim-lspconfig-71eac2ab32b22bf6c2b430632761e5d1930fe81e.zip | |
feat(gh_actions_ls): recognize .forgejo, .gitea as root_dir #3566
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/configs/gh_actions_ls.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lua/lspconfig/configs/gh_actions_ls.lua b/lua/lspconfig/configs/gh_actions_ls.lua index c40c5e25..8325e071 100644 --- a/lua/lspconfig/configs/gh_actions_ls.lua +++ b/lua/lspconfig/configs/gh_actions_ls.lua @@ -9,8 +9,11 @@ return { -- files. (A nil root_dir and no single_file_support results in the LSP not -- attaching.) For details, see #3558 root_dir = function(filename) - return filename:find('/%.github/workflows/.+%.ya?ml') and util.root_pattern('.github')(filename) or nil + return filename:find('/%.(github|forgejo|gitea)/workflows/.+%.ya?ml') + and util.root_pattern('.github', '.forgejo', '.gitea')(filename) + or nil end, + -- Disabling "single file support" is a hack to avoid enabling this LS for -- every random yaml file, so `root_dir()` can control the enablement. single_file_support = false, @@ -29,7 +32,12 @@ https://github.com/lttb/gh-actions-language-server Language server for GitHub Actions. -`gh-actions-language-server` can be installed via `npm`: +The projects [forgejo](https://forgejo.org/) and [gitea](https://about.gitea.com/) +design their actions to be as compatible to github as possible +with only [a few differences](https://docs.gitea.com/usage/actions/comparison#unsupported-workflows-syntax) between the systems. +The `gh_actions_ls` is therefore enabled for those `yaml` files as well. + +The `gh-actions-language-server` can be installed via `npm`: ```sh npm install -g gh-actions-language-server |
