pappasam / nginx-language-server

Language server for nginx.conf
GNU General Public License v3.0
60 stars 2 forks source link

[Question] How to set up variable hover with Neovim native LSP client #15

Closed harry-xm closed 3 years ago

harry-xm commented 3 years ago

I was able to set up variable completion and full directive support, but variable hover won't work even with autocmd setlocal iskeyword+=$. Is there something similar to b:coc_additional_keywords in the native LSP client?

if not lspconfig.pappasam_nginx then
  configs.pappasam_nginx = {
    default_config = {
      cmd = {'nginx-language-server'};
      filetypes = {'nginx'};
      root_dir = function(fname)
        return util.root_pattern("nginx.conf", ".git")(fname) or vim.loop.os_homedir()
      end;
      settings = {};
    };
  }
end

local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true

lspconfig.pappasam_nginx.setup{}
Shinzu commented 1 year ago

@harry-xm how did you solved it, if you solved it?

harry-xm commented 1 year ago

@Shinzu See #17.