GNU bug report logs -
#76423
Major-mode provided LSP server for Eglot
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 <unhammer <at> fsfe.org>
Commit: Kevin Brubeck Unhammer <unhammer <at> fsfe.org>
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
[eglot-server.patch (text/patch, attachment)]
This bug report was last modified 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.