clojure-lsp / clojure-lsp/clojure-lsp
Provide structured data (docstring, arglist, etc.) for completionItem
- Dominant language
- Clojure
- Stars
- 1.3k
- Forks
- 180
- Avg merge
- 13m
- Merged PRs (30d)
- 4
Description
Would y'all be open to a PR that populates the optional `data` field of the LSP [completionItem](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#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:

compared to the built-in Emacs describe function:

(These screenshots are using the [Vertico](https://github.com/minad/vertico) and [Marginalia](https://github.com/minad/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!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.