Tags: patch Tags: patch Eglot should make it easier for major modes to suggest which LSP server to use. Currently major modes end up doing funny dances like: branch: externals/bicep-ts-mode commit 8192a400fae45cdde32526f96bb7ed5158d98008 Author: Kevin Brubeck Unhammer Commit: Kevin Brubeck Unhammer Wait with altering eglot-server-programs until eglot loaded --- bicep-ts-mode.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el index 204629b4c6..f047bccae0 100644 --- a/bicep-ts-mode.el +++ b/bicep-ts-mode.el @@ -205,11 +205,11 @@ Return nil if there is no name or if NODE is not a defun node." . bicep-ts-mode)))) ;;;###autoload -(and (boundp 'eglot-server-programs) - (file-exists-p (bicep-langserver-path)) - (progn - (add-to-list 'eglot-server-programs - `(bicep-ts-mode . ("dotnet" ,(bicep-langserver-path)))))) +(eval-after-load 'eglot + '(and (file-exists-p (bicep-langserver-path)) + (progn + (add-to-list 'eglot-server-programs + `(bicep-ts-mode . ("dotnet" ,(bicep-langserver-path))))))) (provide 'bicep-ts-mode) The patch below would let this major modes do it with a simple: (setq-local eglot-server-programs `(bicep-ts-mode . ("dotnet" ,(bicep-langserver-path)))) - Stefan