Neovim plugin for GitHub Actions.
- configure LSP for GitHub Actions.
example using Lazy plugin manager
{
'disrupted/github-actions.nvim',
ft = 'yaml.github',
---@module 'github-actions.config'
---@type github_actions.Opts
opts = {},
}Some language server features require a GitHub access token.
The default token provider retrieves it from the gh CLI. Make sure it's installed and authenticated (check gh auth status).
If you want to retrieve it from a different CLI, such as a password mananger, you can override the token provider.
Here's an example for op (1Password CLI):
opts = {
token_provider = function(callback)
require('github-actions.lsp.token_provider').system({
'op',
'read',
'op://Work/GitHub/Access Token/xg7h2j4k9m1qv8z3r5w8n2p6s0',
}, callback)
end,
}You can also define a custom token provider function, e.g. to retrieve it from the environment.
opts = {
token_provider = function(callback)
callback(vim.env.GITHUB_TOKEN)
end,
}to add Treesitter parser for GitHub Actions syntax take a look at gh-actions.nvim