Function: eglot-menu
eglot-menu is an interactive and byte-compiled function defined in
eglot.el.gz.
Signature
(eglot-menu ARG1)
Documentation
Eglot
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(easy-menu-define eglot-menu nil "Eglot"
`("Eglot"
;; Commands for getting information and customization.
["Customize Eglot" (lambda () (interactive) (customize-group "eglot"))]
"--"
;; xref like commands.
["Find definitions" xref-find-definitions
:help "Find definitions of identifier at point"
:active (eglot-server-capable :definitionProvider)]
["Find references" xref-find-references
:help "Find references to identifier at point"
:active (eglot-server-capable :referencesProvider)]
["Find symbols in workspace (apropos)" xref-find-apropos
:help "Find symbols matching a query"
:active (eglot-server-capable :workspaceSymbolProvider)]
["Find declaration" eglot-find-declaration
:help "Find declaration for identifier at point"
:active (eglot-server-capable :declarationProvider)]
["Find implementation" eglot-find-implementation
:help "Find implementation for identifier at point"
:active (eglot-server-capable :implementationProvider)]
["Find type definition" eglot-find-typeDefinition
:help "Find type definition for identifier at point"
:active (eglot-server-capable :typeDefinitionProvider)]
"--"
;; LSP-related commands (mostly Eglot's own commands).
["Rename symbol" eglot-rename
:active (eglot-server-capable :renameProvider)]
["Format buffer" eglot-format-buffer
:active (eglot-server-capable :documentFormattingProvider)]
["Format active region" eglot-format
:active (and (region-active-p)
(eglot-server-capable :documentRangeFormattingProvider))]
["Show Flymake diagnostics for buffer" flymake-show-buffer-diagnostics]
["Show Flymake diagnostics for project" flymake-show-project-diagnostics]
["Show Eldoc documentation at point" eldoc-doc-buffer]
"--"
["All possible code actions" eglot-code-actions
:active (eglot-server-capable :codeActionProvider)]
["Organize imports" eglot-code-action-organize-imports
:visible (eglot-server-capable :codeActionProvider)]
["Extract" eglot-code-action-extract
:visible (eglot-server-capable :codeActionProvider)]
["Inline" eglot-code-action-inline
:visible (eglot-server-capable :codeActionProvider)]
["Rewrite" eglot-code-action-rewrite
:visible (eglot-server-capable :codeActionProvider)]
["Quickfix" eglot-code-action-quickfix
:visible (eglot-server-capable :codeActionProvider)]
"--"
["Show type hierarchy" eglot-show-type-hierarchy
:active (eglot-server-capable :typeHierarchyProvider)]
["Show call hierarchy" eglot-show-call-hierarchy
:active (eglot-server-capable :callHierarchyProvider)]
"--"))