-
Notifications
You must be signed in to change notification settings - Fork 194
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
Completion result have "typeParameter" duplicates #273
Comments
I started seeing this when we enabled snippet completion |
Chasing things down seems to be a regression caused by #246. @llan-ml why is this desirable? Or maybe @ccordoba12 has more input |
@masad-frost In some usage cases such as python decorator and passing a function to another function, we only want to complete the name of a function, without including the parenthesis and function arguments. |
Do you have an example? |
I think we should disable this option by default so we don't show what appears to be two repeated entries in the completion widget of clients. |
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
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
The text was updated successfully, but these errors were encountered: