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 4747 deref))))
4848
4949(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 7777 {:name " kill-sexp" :text " Kill sexpr" :description " Kill current sexpr (Paredit)" :keyboard-shortcut {:first " alt K" :replace-all true }}])
7878
7979(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 )]
8181 (let [[line character] (util/editor->cursor-position editor)]
8282 (tasks/run-background-task!
8383 project
129129 (logger/info " Actions registered" ))
130130
131131(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