branch: elpa/typst-ts-mode
commit d614af3433ad73cb3d6818e97cfd2d2b039e2501
Author: Meow King <mr.meowk...@anche.no>
Commit: Meow King <mr.meowk...@anche.no>

    fix: don't add lsp configuration by default to respect user's custom 
configuration
---
 typst-ts-lsp.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/typst-ts-lsp.el b/typst-ts-lsp.el
index 095561eb76..f609863e57 100644
--- a/typst-ts-lsp.el
+++ b/typst-ts-lsp.el
@@ -17,6 +17,14 @@
 
 ;;; Commentary:
 
+;; NOTE we don't provide `eglot-server-programs' configuration here, because
+;; user may have already defined entries before typst-ts-mode load, which will
+;; be override by our provided configuration.  If we want to detect whether
+;; users have their own entries, we can use `eglot--lookup-mode', but the name
+;; of the function means it's an private function and subject to change in the
+;; in the future.
+;; It's better to send a patch to eglot upstream to add the Typst language 
server.
+
 ;;; Code:
 
 (require 'eglot)
@@ -32,10 +40,6 @@
   :group 'typst-ts-lsp
   :type 'file)
 
-(add-to-list 'eglot-server-programs
-             `((typst-ts-mode)
-               .
-               ,(eglot-alternatives `(,typst-ts-lsp-download-path 
"tinymist"))))
 
 ;;;###autoload
 (defun typst-ts-lsp-download-binary ()

Reply via email to