Skip to content

Commit caafb6c

Browse files
committed
Change the type of lsp-java-imports-gradle-wrapper-checksums
1 parent 3c5c470 commit caafb6c

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

lsp-java.el

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,25 @@ bracket-based smart selection."
495495
"Specifies the number of static imports added before a star-import declaration is used."
496496
:type 'number)
497497

498-
(defcustom lsp-java-imports-gradle-wrapper-checksums nil
499-
"Defines allowed/disallowed SHA-256 checksums of Gradle Wrappers"
500-
:type 'lsp-string-vector)
498+
(defun lsp-java--checksum? (candidate)
499+
"Returns true if CANDIDATE is a vector data structure and
500+
every element of it is of type list, else nil."
501+
(and
502+
(vectorp candidate)
503+
(seq-every-p #'consp candidate)))
504+
505+
(define-widget 'lsp-java-checksum-vector 'lazy
506+
"A vector of zero or more elements, every element of which is a checksum object."
507+
:offset 4
508+
:tag "Checksum Vector"
509+
:type '(restricted-sexp
510+
:match-alternatives (lsp-java--checksum?)))
511+
512+
(defcustom lsp-java-imports-gradle-wrapper-checksums []
513+
"Defines allowed/disallowed SHA-256 checksums of Gradle Wrappers.
514+
515+
Sample value: [(:sha256 \"504b..\" :allowed t)]"
516+
:type 'lsp-java-checksum-vector)
501517

502518
(defcustom lsp-java-project-import-on-first-time-startup "automatic"
503519
"Specifies whether to import the Java projects, when opening the folder in Hybrid mode for the first time."

0 commit comments

Comments
 (0)