diff options
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 |
