|
4 | 4 | :implements [com.intellij.openapi.startup.StartupActivity
|
5 | 5 | com.intellij.openapi.project.DumbAware])
|
6 | 6 | (:require
|
| 7 | + [com.github.clojure-lsp.intellij.client :as lsp-client] |
7 | 8 | [com.github.ericdallo.clj4intellij.action :as action]
|
8 | 9 | [com.github.ericdallo.clj4intellij.logger :as logger]
|
9 | 10 | [com.rpl.proxy-plus :refer [proxy+]])
|
|
12 | 13 | [com.intellij.openapi.actionSystem ActionManager AnActionEvent KeyboardShortcut]
|
13 | 14 | [com.intellij.openapi.keymap KeymapManager]
|
14 | 15 | [com.intellij.openapi.project Project]
|
15 |
| - [com.redhat.devtools.lsp4ij.commands CommandExecutor LSPCommandAction LSPCommandContext] |
16 |
| - [javax.swing Icon KeyStroke] |
17 |
| - [org.eclipse.lsp4j Command])) |
| 16 | + [com.redhat.devtools.lsp4ij.commands LSPCommandAction] |
| 17 | + [javax.swing Icon KeyStroke])) |
18 | 18 |
|
19 | 19 | (set! *warn-on-reflection* true)
|
20 | 20 |
|
|
73 | 73 | keymap (.getActiveKeymap keymap-manager)
|
74 | 74 | action (proxy+ ClojureLSPCommand [] LSPCommandAction
|
75 | 75 | (commandPerformed [_ _command ^AnActionEvent event]
|
76 |
| - (-> (CommandExecutor/executeCommand |
77 |
| - (doto (LSPCommandContext. (Command. title id) project) |
78 |
| - (.setPreferredLanguageServerId "clojure-lsp"))) |
79 |
| - (.response) |
80 |
| - )))] |
| 76 | + (lsp-client/execute-command id title)))] |
| 77 | + |
81 | 78 | (.setText (.getTemplatePresentation action) ^String title)
|
82 | 79 | (.setIcon (.getTemplatePresentation action) ^Icon icon)
|
83 | 80 | (when-not (.getAction manager id)
|
|
0 commit comments