Skip to content

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

Open
@Crashdummyy

Description

@Crashdummyy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions