Skip to content

Commit cd9162f

Browse files
authored
fix: guard against nil keyboard-shortcut in register-action! (#85)
* fix: guard against nil keyboard-shortcut in register-action! * fix: file format * fix: restore missing ] in import and fix cond-> formatting
1 parent faa3f3f commit cd9162f

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/main/clojure/com/github/clojure_lsp/intellij/extension/register_actions_startup.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,14 @@
125125
:children [{:type :add-to-group :group-id "NewGroup" :anchor :first}
126126
{:type :reference :ref "ClojureLSP.NewClojureFile"}])
127127
(doseq [{:keys [name text description use-shortcut-of keyboard-shortcut]} clojure-lsp-commands]
128-
(action/register-action! :id (str "ClojureLSP." (csk/->PascalCase name))
129-
:title text
130-
:description description
131-
:icon Icons/CLOJURE
132-
:keyboard-shortcut keyboard-shortcut
133-
:use-shortcut-of use-shortcut-of
134-
:on-performed (partial on-action-performed name text)))
128+
(apply action/register-action!
129+
(cond-> [:id (str "ClojureLSP." (csk/->PascalCase name))
130+
:title text
131+
:description description
132+
:icon Icons/CLOJURE
133+
:use-shortcut-of use-shortcut-of
134+
:on-performed (partial on-action-performed name text)]
135+
keyboard-shortcut (into [:keyboard-shortcut keyboard-shortcut]))))
135136
(register-command! :id "code-lens-references"
136137
:on-performed #'code-lens-references-performed)
137138
(action/register-group! :id "ClojureLSP.Refactors"

0 commit comments

Comments
 (0)