Skip to content

Commit 7ab4d21

Browse files
committed
Copy LAST_JEDI_COMPLETIONS to cell document so that
completionItem/resolve will work
1 parent 8c96441 commit 7ab4d21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pylsp/python_lsp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,10 @@ def _cell_document__completion(self, cellDocument, position=None, **_kwargs):
722722
if item.get("data", {}).get("doc_uri") == temp_uri:
723723
item["data"]["doc_uri"] = cellDocument.uri
724724

725+
# Copy LAST_JEDI_COMPLETIONS to cell document so that completionItem/resolve will work
726+
tempDocument = workspace.get_document(temp_uri)
727+
cellDocument.shared_data["LAST_JEDI_COMPLETIONS"] = tempDocument.shared_data.get("LAST_JEDI_COMPLETIONS", None)
728+
725729
return completions
726730

727731
def m_text_document__completion(self, textDocument=None, position=None, **_kwargs):

0 commit comments

Comments
 (0)