improve(plugin): WIP api of http request

This commit is contained in:
charlie
2022-06-06 23:21:05 +08:00
committed by Tienson Qin
parent 5e67a0f652
commit 3b0e1c58a3
7 changed files with 60 additions and 37 deletions

View File

@@ -531,6 +531,15 @@
(into {} (map (fn [v] [(keyword (:id v)) v]) plugins)))
(state/pub-event! [:plugin/consume-updates]))))
(defn call-plugin
[^js pl type payload]
(when pl
(.call (.-caller pl) (name type) (bean/->js payload))))
(defn request-callback
[^js pl req-id payload]
(call-plugin pl :#lsp#request#callback {:requestId req-id :payload payload}))
;; components
(rum/defc lsp-indicator < rum/reactive
[]