[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jarchive f46a0491f4 1/2: Handling files whose names end
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jarchive f46a0491f4 1/2: Handling files whose names end in ".zip" |
Date: |
Wed, 18 Jan 2023 13:58:08 -0500 (EST) |
branch: externals/jarchive
commit f46a0491f49775f30c50e1b1af355bb99a215d0e
Author: Robert Brown <robert.brown@gmail.com>
Commit: dannyfreeman <danny@dfreeman.email>
Handling files whose names end in ".zip"
This allows LSP servers to refer to source code in the JDK's src.zip
file.
Additionally, handle files in a jar or zip that do not have names
containing a period character.
Finally, update Java language server compatibility info in README.md.
---
README.md | 6 ++++--
jarchive.el | 6 +++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index d3c4c700ff..9a1005d959 100644
--- a/README.md
+++ b/README.md
@@ -73,9 +73,11 @@ so that the transient lsp server that is started when
opening the file is closed
## Language server compatibility
-I personally only test this with [clojure-lsp](https://clojure-lsp.io/).
+I personally only test Jarchive with [clojure-lsp](https://clojure-lsp.io/).
+
+Users report that Jarchive works well with the Java LSP server
+[java-language-server](https://github.com/georgewfraser/java-language-server).
-I have heard from other users that it also works with some unspecified java
language server.
I do know that it does not work with `JDTLS` at them moment, which requires
all clients to implement custom language server extensions and a complicated
non-standard URI scheme to open files in JARs.
Any language server that provides jar: scheme URIs should be picked up by this
package.
diff --git a/jarchive.el b/jarchive.el
index c614f688a7..4089e730a2 100644
--- a/jarchive.el
+++ b/jarchive.el
@@ -39,14 +39,14 @@
line-start
(or "jar:file://" "zipfile://")
;; match group 1, the jar file location
- (group "/" (* not-newline) ".jar")
+ (group "/" (* not-newline) (or ".jar" ".zip"))
;; Delimiter between the jar and the file inside the jar
(or "!" "::")
;; match the leading directory delimiter /,
- ;; archvie mode expects none so it's outside match group 2
+ ;; archive mode expects none so it's outside match group 2
(zero-or-one "/")
;; match group 2, the file within the archive
- (group (* not-newline) "." (+ alphanumeric))
+ (group (* not-newline))
line-end)
"A regex for matching paths to a jar file and a file path into the jar file.
Delimited by `!' for jar: schemes. Delimited by `::' for zipfile: schemes.")