You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Jedi language server in VS Code with the my-python extension and see missing newlines in the function outlines it shows when hovering over a function or in this case, a property.
I'm unsure if that's something that VS Code gets wrong, or the LSP extension sends wrong in the first place; opening the issue here as a starting point, please let me know if I should file it somewhere else.
Steps to reproduce
Add this code to a Python file in VS Code:
something=Path('hello.txt')
something.suffix
Hover with your mouse over "suffix"
Actual
The implementation of PurePath.suffix is shown, without newlines.
Expected
Newlines are shown, as in (abbreviated)
defsuffix(self):
"""The final component's last suffix, if any."""
When running the jedi LSP server with verbose output I see the following interaction.
INFO:pygls.protocol:Sending data: {"jsonrpc": "2.0", "id": 813, "result": {"contents": {"kind": "markdown", "value": "```python\ndef suffix(self): \"\"\"The final component's last suffix, if any.\"\"\" name = self.name i = name.rfind('.') if 0 < i < len(name) - 1: return name[i:] else: return ''\n```\n---\n```text\nThe final component's last suffix, if any.\n```\n**Full name:** `pathlib.PurePath.suffix`"}, "range": {"start": {"line": 133, "character": 41}, "end": {"line": 133, "character": 47}}}}
Newlines (\n) are there, but I'm unsure if that's the way things are expected to be according to the LSP?
Version: 1.65.0
Commit: 2e6cb65aa783ab7f17c9d3e709e65c65f8da3bb0
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Embedder: unknown
I'm using the Jedi language server in VS Code with the my-python extension and see missing newlines in the function outlines it shows when hovering over a function or in this case, a property.
I'm unsure if that's something that VS Code gets wrong, or the LSP extension sends wrong in the first place; opening the issue here as a starting point, please let me know if I should file it somewhere else.
Steps to reproduce
Actual
The implementation of PurePath.suffix is shown, without newlines.
Expected
Newlines are shown, as in (abbreviated)
When running the jedi LSP server with verbose output I see the following interaction.
Newlines (\n) are there, but I'm unsure if that's the way things are expected to be according to the LSP?
Version: 1.65.0
Commit: 2e6cb65aa783ab7f17c9d3e709e65c65f8da3bb0
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Embedder: unknown
Extension version: 2022.2.1924087327
Note: I have initially reported this issue with the ms-python VS Code extension and was asked to move it here. With multiple moving parts involved I'm unsure which part "gets it wrong".
The text was updated successfully, but these errors were encountered: