Browse Source

chore: update docstring of defkeyword

rcmerci 9 tháng trước cách đây
mục cha
commit
f5ffcf1d04
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      src/main/frontend/common/schema_register.clj

+ 4 - 2
src/main/frontend/common/schema_register.clj

@@ -2,9 +2,11 @@
   "Macro 'defkeyword' to def keyword with docstring and malli-schema.
    Used by frontend and worker namespaces")
 
-
 (defmacro defkeyword
-  "Define keyword with docstring and malli-schema"
+  "Define keyword with docstring and malli-schema.
+  How 'find keyword definition' works?
+  clojure-lsp treat keywords defined by `cljs.spec.alpha/def` as keyword-definition.
+  Adding a :lint-as `defkeyword` -> `cljs.spec.alpha/def` in clj-kondo config make it works."
   [kw docstring & [optional-malli-schema]]
   (assert (keyword? kw) "must be keyword")
   (assert (some? docstring) "must have 'docstring' arg")