It seems the supported way to change configurations as per the LSP is to send workspace/didChangeConfiguration, and that is what python-lsp-server supports (source).
The problem
rope_autoimport needs to create an index of the python modules, and it only does so when enabled at server startup. When enabling it dynamically at runtime, it doesn't do so. This is especially is an issue when using the memory = True setting.
One solution
I propose extending the hookspecs to add a hook pylsp_workspace_configuration_changed and to implement that hook in rope_autoimport, like this one.
It seems the supported way to change configurations as per the LSP is to send
workspace/didChangeConfiguration
, and that is whatpython-lsp-server
supports (source).The problem
rope_autoimport
needs to create an index of the python modules, and it only does so when enabled at server startup. When enabling it dynamically at runtime, it doesn't do so. This is especially is an issue when using thememory = True
setting.One solution
I propose extending the hookspecs to add a hook
pylsp_workspace_configuration_changed
and to implement that hook inrope_autoimport
, like this one.