Skip to content
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

Function information provided by Jedi lacks newlines #18785

Closed
imphil opened this issue Mar 25, 2022 · 2 comments
Closed

Function information provided by Jedi lacks newlines #18785

imphil opened this issue Mar 25, 2022 · 2 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@imphil
Copy link

imphil commented Mar 25, 2022

I'm using the Jedi language server 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.

grafik

Expected
Newlines are shown, as in (abbreviated)

def suffix(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

Extension version: 2022.2.1924087327

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 25, 2022
@karthiknadig karthiknadig self-assigned this Mar 28, 2022
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. triage and removed triage-needed Needs assignment to the proper sub-team labels Mar 28, 2022
@karthiknadig
Copy link
Member

@imphil We use jedi-language-server python library for this, please file an issue here: https://github.com/pappasam/jedi-language-server/issues

@imphil
Copy link
Author

imphil commented Mar 28, 2022

Thanks @karthiknadig, I've reported this issue here: pappasam/jedi-language-server#200

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants