Closed
Description
Completion items keep including duplicate items, but one of them has object
at the end of the label.
Here is an example request, with document print
Expand to see request.
Trigger completion after `print` ```json { "method": "textDocument/completion", "params": { "textDocument": { "uri": "file:///home/user/dir/main.py" }, "position": { "line": 0, "character": 5 }, "context": { "triggerKind": 1 } }, "id": 1200384153, "jsonrpc": "2.0" } ```Expand to see result
{
"isIncomplete": false,
"items": [
{
"label": "print(values, sep, end, file, flush)",
"kind": 3,
"sortText": "aprint",
"insertText": "print",
"data": {
"doc_uri": "file:///home/runner/ExtraneousExcitedWebsites/main.py"
}
},
{
"label": "print(values, sep, end, file, flush) object",
"kind": 25,
"sortText": "aprint",
"insertText": "print",
"data": {
"doc_uri": "file:///home/runner/ExtraneousExcitedWebsites/main.py"
}
}
]
}
Expand to see initialization options
```json { "method": "initialize", "params": { "capabilities": { "textDocument": { "synchronization": { "dynamicRegistration": true, "didSave": true }, "signatureHelp": { "dynamicRegistration": true, "signatureInformation": { "documentationFormat": [ "plaintext", "markdown" ] } }, "publishDiagnostics": { "relatedInformation": true }, "formatting": { "dynamicRegistration": true }, "documentSymbol": { "dynamicRegistration": true, "hierarchicalDocumentSymbolSupport": true, "symbolKind": { "valueSet": [ 18, 17, 5, 14, 9, 10, 22, 24, 8, 1, 12, 11, 20, 6, 2, 3, 19, 25, 4, 7, 15, 23, 26, 13 ] } }, "definition": { "dynamicRegistration": true }, "typeDefinition": { "dynamicRegistration": true }, "implementation": { "dynamicRegistration": true }, "references": { "dynamicRegistration": true }, "rename": { "dynamicRegistration": true, "prepareSupport": true }, "completion": { "dynamicRegistration": true, "completionItem": { "documentationFormat": [ "plaintext", "markdown" ], "snippetSupport": true } }, "codeAction": { "dynamicRegistration": true, "codeActionLiteralSupport": { "codeActionKind": { "valueSet": [ "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports", "source.fixAll" ] } } }, "hover": { "dynamicRegistration": true, "contentFormat": [ "plaintext" ] } }, "workspace": { "applyEdit": true, "configuration": true, "executeCommand": { "dynamicRegistration": true }, "workspaceEdit": { "documentChanges": true, "resourceOperations": [ "create", "delete", "rename" ] } } }, "processId": null, "rootUri": "file:///home/runner/ExtraneousExcitedWebsites", "workspaceFolders": [ { "name": "file:///home/runner/ExtraneousExcitedWebsites", "uri": "file:///home/runner/ExtraneousExcitedWebsites" } ] }, "id": 79703483, "jsonrpc": "2.0" } ```I found this in the codebase
python-lsp-server/pylsp/plugins/jedi_completion.py
Lines 84 to 109 in 449d11a
Not sure what is the point of it.
Some guidance and I'll happily fix the issue
Metadata
Metadata
Assignees
Labels
No labels