Skip to content

Commit f951c48

Browse files
committed
fix: config
1 parent 163dd6e commit f951c48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pylsp/plugins/rope_autoimport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@hookimpl
2323
def pylsp_settings() -> Dict[str, Dict[str, Dict[str, Any]]]:
2424
# Default rope_completion to disabled
25-
return {"plugins": {"rope_autoimport": {"enabled": False, "memory": True}}}
25+
return {"plugins": {"rope_autoimport": {"enabled": True, "memory": False}}}
2626

2727

2828
def _should_insert(expr: tree.BaseNode, word_node: tree.Leaf) -> bool:
@@ -212,7 +212,7 @@ def _sort_import(score: int) -> str:
212212
@hookimpl
213213
def pylsp_initialize(config: Config, workspace: Workspace):
214214
"""Initialize AutoImport. Generates the cache for local and global items."""
215-
memory: bool = config.settings().get("rope_autoimport", {})["memory"]
215+
memory: bool = config.plugin_settings("rope_autoimport").get("memory", False)
216216
rope_config = config.settings().get("rope", {})
217217
autoimport = workspace._rope_autoimport(rope_config, memory)
218218
autoimport.generate_modules_cache()

0 commit comments

Comments
 (0)