emacs-lsp/lsp-mode

Consider sending didChangeConfiguration when settings change.

muirdm opened this issue · 3 comments

Some servers support dynamically updating server config settings. It would be cool if we automatically sent "workspace/didChangeConfiguration" notifications when a user updates a custom setting variable or calls lsp-register-custom-settings directly. Currently AFAIK the user must restart the server after changing settings.

It will be a nice improvement, we could do it by:

  1. Adding association server->section(s) in lsp--client. AFAIK vscode clients declare which sections to synchronize.
  2. Emacs 26 has :get and :set (see https://www.gnu.org/software/emacs/manual/html_node/elisp/Variable-Definitions.html) which could be used to update find the servers and update them.

This would be nice to have! We have to stick a little warning in at the moment that you have to restart the server to pick up settings.

Doing 1 would have some other benefits, e.g. some informative commands like lsp-describe-session could also point people towards the right setting customization group.

Posted a PR at #3167 . We have to migrate all properties to use defcustom-lsp and then configure the client which sections it wants to have synched.