Skip to content

Commit 6209ede

Browse files
snippets: lsp ignore redefined var
Add metadata to instruct clj-kondo, used by Clojure LSP, to ignore vars that are defined more than once in a namespace Often used with rich comment forms, this metadata can be very useful for a single form as well
1 parent c5854d7 commit 6209ede

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

config.edn

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,20 @@
303303

304304
{:name "is"
305305
:detail "assertion for clojure.test"
306-
:snippet "(is (= ${1:function call} ${2:expected result}))$0"}]
306+
:snippet "(is (= ${1:function call} ${2:expected result}))$0"}
307307

308+
;; ---------------------------------------------------------
309+
;; Clojure LSP and Clj-kondo snippets
310+
311+
{:name "lsp-ignore-redefined"
312+
:detail "Ignore redefined Vars"
313+
:snippet
314+
"#_{:clj-kondo/ignore [:redefined-var]}
315+
$0"}
316+
317+
;; End of Clojure LSP and Clj-kondo snippets
318+
;; ---------------------------------------------------------
319+
]
308320
;; End of LSP snippets
309321
;; --------------------------------------------------
310322

0 commit comments

Comments
 (0)