From 878dc9421b3475d4953073b55cc0aaf2fd2fa8dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felici=C3=A1n=20N=C3=A9meth?= Date: Sat, 8 Feb 2025 11:53:31 +0100 Subject: [PATCH] Eglot: do not activate unsupported menu items * lisp/progmodes/eglot.el (eglot-menu): Do not activate items that the server does not support. (cherry picked from commit 3fde13a5019bafbd2b1059e061a4b0869123564f) --- lisp/progmodes/eglot.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 9e238553216..995d47a1306 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2301,8 +2301,10 @@ If it is activated, also signal textDocument/didOpen." ["Quickfix" eglot-code-action-quickfix :visible (eglot-server-capable :codeActionProvider)] "--" - ["Show type hierarchy" eglot-show-type-hierarchy] - ["Show call hierarchy" eglot-show-call-hierarchy] + ["Show type hierarchy" eglot-show-type-hierarchy + :active (eglot-server-capable :typeHierarchyProvider)] + ["Show call hierarchy" eglot-show-call-hierarchy + :active (eglot-server-capable :callHierarchyProvider)] "--")) (easy-menu-define eglot-server-menu nil "Manage server communication" -- 2.39.5