Skip to content

Commit 117b6f9

Browse files
committed
Fix inconsistent project
1 parent 26685f1 commit 117b6f9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@
7676
{:name "raise-sexp" :text "Raise sexpr" :description "Raise current sexpr (Paredit)" :keyboard-shortcut {:first "alt R" :replace-all true}}
7777
{:name "kill-sexp" :text "Kill sexpr" :description "Kill current sexpr (Paredit)" :keyboard-shortcut {:first "alt K" :replace-all true}}])
7878

79-
(defn ^:private on-action-performed [command-name text project ^AnActionEvent event]
79+
(defn ^:private on-action-performed [command-name text ^AnActionEvent event]
8080
(when-let [editor ^Editor (.getData event CommonDataKeys/EDITOR_EVEN_IF_INACTIVE)]
81-
(let [[line character] (util/editor->cursor-position editor)]
81+
(let [project (.getProejct event)
82+
[line character] (util/editor->cursor-position editor)]
8283
(tasks/run-background-task!
8384
project
8485
"LSP: refactoring"
@@ -109,15 +110,15 @@
109110
(.getDataContext event)
110111
(.getInputEvent event))))
111112

112-
(defn -runActivity [_this ^Project project]
113+
(defn -runActivity [_this ^Project _project]
113114
(doseq [{:keys [name text description use-shortcut-of keyboard-shortcut]} clojure-lsp-commands]
114115
(action/register-action! :id (str "ClojureLSP." (csk/->PascalCase name))
115116
:title text
116117
:description description
117118
:icon Icons/CLOJURE
118119
:keyboard-shortcut keyboard-shortcut
119120
:use-shortcut-of use-shortcut-of
120-
:on-performed (partial on-action-performed name text project)))
121+
:on-performed (partial on-action-performed name text)))
121122
(register-command! :id "code-lens-references"
122123
:on-performed #'code-lens-references-performed)
123124
(action/register-group! :id "ClojureLSP.Refactors"

0 commit comments

Comments
 (0)