Skip to content

Settings file support #139

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
hatzel opened this issue Sep 30, 2017 · 7 comments
Closed

Settings file support #139

hatzel opened this issue Sep 30, 2017 · 7 comments

Comments

@hatzel
Copy link

hatzel commented Sep 30, 2017

Am I correct in assuming that settings files like this: https://github.com/rust-lang-nursery/rls#configuration are not supported in LanguageClient-neovim? If so could you give me a few pointers as to what it would take to implement this.

@DeltaEvo
Copy link
Contributor

LanguageClient-neovim support sending notifications to language server with https://github.com/autozimu/LanguageClient-neovim/blob/master/doc/LanguageClient.txt#L233, so you are wrong 😄

@hatzel
Copy link
Author

hatzel commented Sep 30, 2017

Technically correct :D but the interesting part would be having a file in the project root that is used for this.
I am not to sure about security implications though.

@autozimu
Copy link
Owner

autozimu commented Sep 30, 2017

Currently the notification is not implemented.

Should be relatively easy to implement though.

@DeltaEvo
Copy link
Contributor

DeltaEvo commented Oct 6, 2017

I don't think this must be added to LanguageClient-neovim, because not everyone want to send config the same way, if you want to use a settings.json like VSCode you can implement it with vim script like

function! LoadConfig()
        let config = json_decode(system("cat settings.json"))
        call LanguageClient_notify('workspace/didChangeConfiguration', { 'settings': config })
endfunction

augroup JSON_Config
        autocmd!
        autocmd User LanguageClientStarted call LoadConfig()
augroup END

(I don't tested it)

@hatzel
Copy link
Author

hatzel commented Oct 6, 2017

I would be in favor of having an auto-discovery option in LanguageClient-neovim for this. That way we are doing it like other plugins (YCM for example). This would mean that I build a function to load a specific file and a function to find the project root, those could be enabled via a variable in your vim config.

Seeing that VSCode does it this way I think the option should even be enabled by default but I am not sure if that really is the "sane default" here.

@autozimu
Copy link
Owner

autozimu commented Oct 8, 2017

I'm fine with adding support in this plugin.

We could implement behind a settings, with default to not send settings file.

@juancampa
Copy link

@hatzel If I understand correctly this would add support for "workspaces", right?. i.e. when the server start it should scan all the files in the workspace as opposed to just the current file.

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

4 participants