emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/jarchive 81c4b345bf 20/33: Set dependency-scheme to "ja


From: ELPA Syncer
Subject: [elpa] externals/jarchive 81c4b345bf 20/33: Set dependency-scheme to "jar" on clojure-lsp initialization
Date: Sat, 12 Nov 2022 17:57:57 -0500 (EST)

branch: externals/jarchive
commit 81c4b345bf6a627fe8e9d96de0343189cd242e5e
Author: dannyfreeman <danny@dfreeman.email>
Commit: dannyfreeman <danny@dfreeman.email>

    Set dependency-scheme to "jar" on clojure-lsp initialization
    
    Without this, jarchive won't work. Another option would be to enable
    working with zipfile type URIs
---
 jarchive.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/jarchive.el b/jarchive.el
index 44f6b6b294..587ba747a7 100644
--- a/jarchive.el
+++ b/jarchive.el
@@ -106,11 +106,20 @@ TODO: this might be unnecessary, try to remove"
   (and (string-match-p jarchive--uri-regex buffer-file-name)
        t))
 
+;; Eventually clojure-lsp devs may make this the default.
+(defvar jarchive-eglot-clojure-lsp-initialization-options '(:dependency-scheme 
"jar")
+  "If non-nil, use these options when starting clojure-lsp servers with 
eglot.")
+
 ;;;###autoload
 (defun jarchive-setup ()
+  "setup jarchive, enabling emacs to open files inside jar archives.
+the files can be identified with the `jar' uri scheme."
   (interactive)
   (with-eval-after-load 'eglot
-    (setq eglot-preserve-jar-uri t))
+    (when (and jarchive-eglot-clojure-lsp-initialization-options (boundp 
'eglot-server-programs))
+      (add-to-list 'eglot-server-programs
+                   `((clojure-mode clojurescript-mode clojurec-mode) .
+                     ("clojure-lsp" :initializationOptions 
,jarchive-eglot-clojure-lsp-initialization-options)))))
   (add-to-list 'file-name-handler-alist (cons jarchive--uri-regex 
#'jarchive--file-name-handler))
   (add-to-list 'find-file-not-found-functions #'jarchive--find-file-not-found))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]