-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT: add support for GH actions Language server #506
base: main
Are you sure you want to change the base?
Conversation
Adds support for Github Actions.
@@ -238,12 +238,13 @@ return { | |||
xsd = { "lemminx" }, | |||
xsl = { "lemminx" }, | |||
xslt = { "lemminx" }, | |||
yaml = { "azure_pipelines_ls", "hydra_lsp", "snyk_ls", "spectral", "yamlls" }, | |||
yaml = { "azure_pipelines_ls", "github_actions_ls", "hydra_lsp", "snyk_ls", "spectral", "yamlls" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think yaml.github
should suffice, we don't need to register it for all YAML files. then we can even get rid of the runtime check in lspconfig root_dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I am using this rule for my config (in ftdetect
). I guess this would need to be registered somewhere, not sure where it's done for yaml.gitlab
which is very similar
vim.filetype.add({
pattern = {
['.*/%.github[%w/]+workflows[%w/]+.*%.ya?ml'] = 'yaml.gha', -- could be yaml.github instead
},
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it from yaml
see: 584b05a
I guess this would need to be registered somewhere, not sure where it's done
Yeah I wonder too, it would be great if users wouldn't have to worry about it. Should there be some init script for like /lua/mason-lspconfig/server_configurations/pylsp/init.lua
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked it up for the existing GitLab CI LS and there it is also the user's responsibility to add the filetype pattern. I guess if it gains enough traction it might be worth upstreaming into Neovim core.
For now I am just using my own little wrapper plugin https://github.com/disrupted/github-actions.nvim which defines and lazy-loads using ftdetect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah or we can just document that ppl need to register the pattern, as long as it's part of the docs, it's OK .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to open a PR for lspconfig as well
Adds support for Github Actions.
Caution
I'm not familiar with the codebase and I've never added such configuration. I could use help on this one.
I tried looking at other PRs to see whether I'm doing it right.