Fork me on GitHub

Sounds great! I look forward to enough of an example to actually try it out 🙂

Lukas Domagala10:12:14

a minimal example would be this:

(launcher/eval-str (str '(ns mine
                                       [portal.ui.inspector :as inspector]))
                          '(defn register-viewer! [viewer-spec]
                             (swap! inspector/viewers conj viewer-spec))
                          '(register-viewer! {:predicate string?
                                              :component (fn [val]
                                                            {:title "Time"
                                                             {:display :flex
                                                              :align-items :center}}
                                              :name :portal.viewer/testing5})
the ’1 at the end is just so you don’t blow up transit with the return value.


Ah, an explicit eval call. And how to reach from sci into the VS Code APIs I wonder?

Lukas Domagala18:12:20

you can’t since that ns is not passed to sci


My main interest in customization here is being able to have Portal invoke commands in the host editor (well, VS Code, but I suspect the IntelliJ folks would like this too).

Lukas Domagala15:12:28

If @U1G869VNV is busy I can try to find some time for a quick prototype, although I've only build custom versions of the standalone ui till now


You can pass the entire JS world to SCI using {:classes {'js goog/global :allow :all}}


Then you should be able to call into any API using (js/vscode.api.foobar)