emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol

Home Page:https://emacs-lsp.github.io/lsp-mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider sending didChangeConfiguration when settings change.

muirdm opened this issue · 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.