Skip to content

Provide structured data (docstring, arglist, etc.) for completionItem #1929

Open
@lynaghk

Description

@lynaghk

Would y'all be open to a PR that populates the optional data field of the LSP completionItem with a map of more structured information?
E.g., for a function it would include the symbol, fully qualified symbol, docstring, arglist, etc.

This would allow clients to display more structured information.

I started investigating this when I noticed that the Emacs completions were quite bare for lsp-mode Clojure:

SCR-20241210-nztv

compared to the built-in Emacs describe function:

SCR-20241210-oaky

(These screenshots are using the Vertico and Marginalia Emacs packages.)

I would love for the completion to actually search for matches in docstrings too, though that would likely be a more involved change.
(I'd probably build an n-gram index using roaring bitmaps.)

Anyway, just wanted to float the idea before I started working on anything.
I totally understand if this would be out of scope for the project and more appropriate for a fork / standalone thing.

Clojure LSP is really cool and I will continue to use it either way --- thanks for all the great work!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions