Skip to content
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

[LanguageServer] How to provide initializationOptions for uses completion( nvim ) #148

Open
Crashdummyy opened this issue Jan 23, 2025 · 3 comments

Comments

@Crashdummyy
Copy link

I am currently not able to get the languageServer fully functional.

While all the basic stuff works I cant find out how to use the advanced functionality.
https://github.com/actions/languageservices/tree/main/languageserver#providing-advanced-functionality

Image

I am setting this up following the specification. -> https://neovim.io/doc/user/lsp.html#lsp-quickstart

{
    cmd = { 'gh-actions-language-server', '--stdio' },
    filetypes = { 'yaml', 'yml' },

    root_dir = function(filename)
      return filename:find('/%.github/workflows/.+%.ya?ml') and require 'lspconfig.util'.root_pattern('.github')(filename) or nil
    end,
    single_file_support = false,

   initializationOptions = {
          sessionToken = vim.env.GITHUB_TOKEN,
          logLevel = 1
    },

    capabilities = {
      workspace = {
        didChangeWorkspaceFolders = {
          dynamicRegistration = true,
        },
      },
    },
  }

But while it does work using the visual studio code after the login I cant figure out how to get the completion working here.

Image

@Crashdummyy Crashdummyy changed the title [LanguageServer] How to provide initializationOptions ( nvim ) [LanguageServer] How to provide initializationOptions for uses completion( nvim ) Feb 2, 2025
@Crashdummyy
Copy link
Author

When I provide some bogus for the session token it fails to fetch action/upload-artifact all together so the token is definitely passed.

@disrupted
Copy link

Completion also does not work for me in VS Code.

Image

Hover on those same with arguments works both in VS Code and Neovim.

Image

@Crashdummyy
Copy link
Author

Completion also does not work for me in VS Code.

Image Hover on those same `with` arguments works both in VS Code and Neovim. Image

Its very weird...
WHen I installed the plugin in vscode I had to sign in and I additionally had to restart vscode for the completion to work.
But it does work now ( I dont want to use vscode tho )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants