File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
src/main/clojure/com/github/clojure_lsp/intellij Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 47
47
deref))))
48
48
49
49
(defn execute-command [^String name ^String text ^List args ^Project project]
50
- (-> (CommandExecutor/executeCommand
51
- (doto (LSPCommandContext. (Command. text name args) project)
52
- (.setPreferredLanguageServerId " clojure-lsp" )))
53
- (.response )
54
- deref))
50
+ (try
51
+ (-> (CommandExecutor/executeCommand
52
+ (doto (LSPCommandContext. (Command. text name args) project)
53
+ (.setPreferredLanguageServerId " clojure-lsp" )))
54
+ (.response )
55
+ deref)
56
+ (catch Exception e
57
+ (logger/error " Error appllying command" name (with-out-str (.printStackTrace e))))))
Original file line number Diff line number Diff line change 77
77
{:name " kill-sexp" :text " Kill sexpr" :description " Kill current sexpr (Paredit)" :keyboard-shortcut {:first " alt K" :replace-all true }}])
78
78
79
79
(defn ^:private on-action-performed [command-name text project ^AnActionEvent event]
80
- (when-let [editor ^Editor (.getData event CommonDataKeys/EDITOR )]
80
+ (when-let [editor ^Editor (.getData event CommonDataKeys/EDITOR_EVEN_IF_INACTIVE )]
81
81
(let [[line character] (util/editor->cursor-position editor)]
82
82
(tasks/run-background-task!
83
83
project
129
129
(logger/info " Actions registered" ))
130
130
131
131
(comment
132
- (-runActivity nil (first (db/all-projects ))))
132
+ (do
133
+ (.unregisterAction (ActionManager/getInstance ) " ClojureLSP.ForwardSlurp" )
134
+ (.unregisterAction (ActionManager/getInstance ) " ClojureLSP.ForwardBarf" )
135
+ (-runActivity nil (first (db/all-projects )))))
You can’t perform that action at this time.
0 commit comments