Eglot: add server menu into main menu

* lisp/progmodes/eglot.el (eglot-menu): Add separator at end
and add in eglot-server menu at load-time.
(eglot-server-menu): Rework menu title and description.
This commit is contained in:
João Távora 2025-01-31 10:31:37 +00:00
parent c2822650a2
commit bd39ec062d

View file

@ -2283,10 +2283,11 @@ If it is activated, also signal textDocument/didOpen."
["Rewrite" eglot-code-action-rewrite
:visible (eglot-server-capable :codeActionProvider)]
["Quickfix" eglot-code-action-quickfix
:visible (eglot-server-capable :codeActionProvider)]))
:visible (eglot-server-capable :codeActionProvider)]
"--"))
(easy-menu-define eglot-server-menu nil "Monitor server communication"
'("Debugging the server communication"
(easy-menu-define eglot-server-menu nil "Manage server communication"
'("Server menu"
["Reconnect to server" eglot-reconnect]
["Quit server" eglot-shutdown]
"--"
@ -2297,6 +2298,9 @@ If it is activated, also signal textDocument/didOpen."
(interactive)
(customize-variable 'eglot-events-buffer-size))]))
(add-to-list 'eglot-menu
`(eglot-server-menu menu-item "Server menu" ,eglot-server-menu) t)
;;; Mode-line
;;;