Skip to content

How to set InitializeParams.initializationOptions? #178

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

Closed
htfy96 opened this issue Nov 18, 2017 · 5 comments
Closed

How to set InitializeParams.initializationOptions? #178

htfy96 opened this issue Nov 18, 2017 · 5 comments

Comments

@htfy96
Copy link

htfy96 commented Nov 18, 2017

I am trying to get this client working with CQuery, a new C++ language server. However, it reported that FATL| Initialization parameters (particularily cacheDirectory) are required in its log because during initialize, initializationOptions.cacheDirectory must be set.

It seems that currently there is no way to set these options in this plugin. This problem also affects clangd, which by default works only in C++98 mode and considers all syntax in C++11 as errors. Is it possible to set initializationOptions with default values/callback functions?

Thanks.

@autozimu
Copy link
Owner

Resolved in ef2b82c.

@DeltaEvo
Copy link
Contributor

I added a little wiki page to help to settup cquery with LanguageClient-neovim https://github.com/autozimu/LanguageClient-neovim/wiki/cquery

@MaskRay
Copy link
Contributor

MaskRay commented Dec 3, 2017

It's better to have some way to use different initializationOptions for different language servers

{
        "initializationOptions": {
                "cacheDirectory": "/tmp/cquery",
		"resourceDirectory": "yourCQueryDirectory/clang_resource_dir"
        }
}

@oblitum
Copy link

oblitum commented Nov 11, 2018

That's right, I just asked about this here: #633 (comment).

@oblitum
Copy link

oblitum commented Nov 11, 2018

"Method2" of the Yaml wiki entry shows one possible way to circumvent this limitation, but it's a bit ugly: https://github.com/autozimu/LanguageClient-neovim/wiki/yaml-language-server, it uses call LanguageClient#Notify('workspace/didChangeConfiguration', { 'settings': config }) to set a different config settings path per language on an autoload script.

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

5 participants