feat(gh_actions_ls): enable advanced functionality#4214
Draft
rmuir wants to merge 1 commit intoneovim:masterfrom
Draft
feat(gh_actions_ls): enable advanced functionality#4214rmuir wants to merge 1 commit intoneovim:masterfrom
rmuir wants to merge 1 commit intoneovim:masterfrom
Conversation
Problem gh_actions_ls requires repository metadata and access token for full functionality. Solution Use the `gh` CLI, if available, to populate the necessary metadata for the language server to provide completion and validation of "uses ... with" parameters, repository/organization variables and secrets.
justinmk
reviewed
Nov 26, 2025
| before_init = function(params, config) | ||
| if config.root_dir and vim.fn.executable('gh') == 1 then | ||
| params.initializationOptions = { | ||
| sessionToken = token(), |
Member
There was a problem hiding this comment.
should probably ad a :LspGhLogin or something like that, rather than calling this as soon as the config is resolved.
Contributor
Author
There was a problem hiding this comment.
will have to think thru how to plumb this. unfortunately the server requires this information as initializationOptions up-front, and doesn't appear to allow it to be set via workspace/didChangeConfiguration or similar...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
gh_actions_ls requires repository metadata and access token for full functionality.
Solution
Use the
ghCLI, if available, to populate the necessary metadata for the language server to provide completion and validation of "uses ... with" parameters, repository/organization variables and secrets.Notes:
gh repo viewis used, as opposed to alternatives such asgh api repos/{owner}/{repo}because it contains all the data needed and "just works".gh, just haveghavailable and authed. For example, it still works if you haventgh repo set-default.Questions:
cc: @jugarpeupv who raised this on #4046