-
Notifications
You must be signed in to change notification settings - Fork 272
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
Comments
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 😄 |
Technically correct :D but the interesting part would be having a file in the project root that is used for this. |
Currently the notification is not implemented. Should be relatively easy to implement though.
|
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) |
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. |
I'm fine with adding support in this plugin. We could implement behind a settings, with default to not send settings file. |
@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. |
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.
The text was updated successfully, but these errors were encountered: