Skip to content

Commit b69f77e

Browse files
committed
Add inlay-hint support
1 parent 6b5af1a commit b69f77e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
/.lein-failures
44
.nrepl-port
55
**/*/.lsp/.cache
6-
**/*/.clj-kondo/.cache
76
.lsp/.cache
8-
.clj-kondo/.cache
7+
8+
.clj-kondo/
9+
!.clj-kondo/config.edn
910
/out
1011
target/
1112
/.DS_Store

src/lsp4clj/coercer.clj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
(s/def ::uri string?)
110110

111111
(s/def ::edits (s/coll-of ::text-edit))
112+
(s/def ::text-edits (s/coll-of ::text-edit))
112113
(s/def ::edits-or-error
113114
(s/and (s/or :error ::response-error
114115
:edits ::edits)
@@ -421,6 +422,17 @@
421422
:ranges ::folding-ranges)
422423
(s/conformer second)))
423424

425+
(def inlay-hint-kind-enum {:type 1 :parameter 2})
426+
427+
(s/def :inlay-hint/kind (s/and keyword?
428+
inlay-hint-kind-enum
429+
(s/conformer inlay-hint-kind-enum)))
430+
431+
(s/def ::inlay-hint
432+
(s/keys :req-un [::position ::label]
433+
:opt-un [:inlay-hint/kind ::text-edits ::tooltip ::padding-left ::padding-right ::data]))
434+
(s/def ::inlay-hints (s/coll-of ::inlay-hint))
435+
424436
(s/def :server-capabilities/signature-help-provider
425437
(s/conformer #(cond (vector? %) {:trigger-characters %}
426438
(map? %) %

0 commit comments

Comments
 (0)