Introduction Helm and Ivy users have extra commands that leverage lsp-mode extra information, let's try to mimic a few features of [[https://github.com/emacs-lsp/helm-lsp][helm-lsp]] and [[https://github.com/emacs-lsp/lsp-ivy][lsp-ivy]] in consult workflow (tested with selectrum and dogfed with vertico)
Screenshots
They tend not to be updated as often as changes happen, sorry if there are slight differences in UI. Those shots are more about giving an idea of what's happening.
[[https://github.com/gagbo/consult-lsp/blob/screenshots/media/consult-lsp-diagnostics.png?raw=true]]
[[https://github.com/gagbo/consult-lsp/blob/screenshots/media/consult-lsp-symbols.png?raw=true]]
[[https://github.com/gagbo/consult-lsp/blob/screenshots/media/consult-lsp-file-symbols.png?raw=true]]
There is currently no plan to add an interface to list and/or act on code-actions, but contributions are welcome!
This package provides 2 entry points per command in order to customize the appearance of candidates in the selection/completion interface. This is mostly for advanced users who are somewhat familiar with consult API:
You are encouraged to take a look at the default values if you wish to customize
these, especially the file-symbols
one, which is probably the easiest ones to
grok, and use marginalia.
** Keys *** Categories for symbols =consult-lsp-symbols= and =consult-lsp-file-symbols= can have the set of "narrow" keys you like by customizing =consult-lsp-symbols-narrow=.
The ~cdrs~ of the alist must match the symbol types returned by LSP servers, AND have an "Other" key for everything that is not included.
You can find categories by looking for the [[https://microsoft.github.io/language-server-protocol/specification.html#textDocument_documentSymbol][SymbolKind enum]] in the LSP specification.
*** Bindings As you can do with helm-lsp,
Use the following line to replace xref-find-apropos in lsp-mode controlled buffers:
(define-key lsp-mode-map [remap xref-find-apropos] #'consult-lsp-symbols)