Skip to content

Improve LSP support #3453

Open
Open
@mattrunyon

Description

@mattrunyon

As a user, I want better LSP support so that the web IDE provides more niceties that I use in my desktop IDE.

We currently have support for Completion Request, but we could add support for several other items with Jedi. This list will be in the order that I find most useful/impactful, but all of them enhance the user experience.

  • Completion request - We support this, but could improve to also include
    • CompletionItemKind - use LSP enum and then we will convert to monaco enum on client b/c monaco uses a different order for some reason
    • documentation in the response provides an arrow the user can click to see more docs. Or we can use this hack to show the documentation always. VSCode shows this documentation by default.
    • detail - this is often used to show the package or some potential item in the autocomplete item on the right side. VSCode for web stuff shows the package name if it is something that will be auto imported on autocomplete. Pycharm has some info about the package the item belongs to regardless of if it is imported already
    • deprecated - Not sure if we're marking anything as deprecated in the Python code, but would be a nice-to-have in the future if we start deprecating APIs. Shows the autocomplete item with strikethrough to indicate deprecation
  • Signature help - Provides docstring and param info when you start calling a function
  • Hover request - Provides docstring and other relevant info when hovering over a symbol
  • LSP Diagnostics #3614
  • Document formatting request - Would be nice to have the code follow some pep8 formatter when possible. The user should be able to disable formatting on the client. This would trigger formatting on save
  • Document on Type Formatting Request - Auto indent is usually ok, but this might provide some more info
  • Rename request - Useful for renaming a variable throughout a document

I'm sure there are others that would improve the user experience. The first 2 are major improvements IMO while the others are nice-to-haves.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions