Skip to content
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

rope_autoimport doesn't initialize after workspace/didChangeConfiguration message #460

Closed
tkrabel-db opened this issue Oct 13, 2023 · 1 comment · Fixed by #461
Closed
Labels
enhancement New feature or request
Milestone

Comments

@tkrabel-db
Copy link
Contributor

tkrabel-db commented Oct 13, 2023

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.

@ccordoba12
Copy link
Member

Fixed by #461.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants