Fork me on GitHub
#portal
<
2021-12-07
>
Jakub Holý (HolyJak)08:12:17

Hi! How does the intellij plugin work? I guess I still need to add portal to my project's dependencies and execute st. like (portal.api/open {:launcher :intellij}) (just guessing here)? It does not seem to be enough, the Portal plugin still shows "nothing to show" even though tap> returned true Ah, I see, I also need (add-tap (requiring-resolve 'portal.api/submit)) Ok, I have solved it => https://github.com/djblue/portal/pull/89/files

1
wilkerlucio14:12:14

@U0522TWDA one suggestion change for the snippet:

(do
  (require 'portal.api)
  (def user/portal (portal.api/open {:launcher :intellij}))
  (add-tap #'portal.api/submit))

wilkerlucio14:12:42

using def allows you to deref @user/portal to use the selected value in Portal on the REPL

Jakub Holý (HolyJak)14:12:40

Ah, nice, thank you!

mschmele21:12:13

I've noticed that when I use the vs-code view for portal, I can't dereference objects, but when I use the standard launcher I can. Has anybody else experienced something similar?

mschmele21:12:21

With the exception of keys, most of the time I get nil when I select something and call @dev/portal

mschmele21:12:34

(this is a very small issue, as I can just remove the {:launcher :vs-code} option)

djblue21:12:41

@mschmele what type of values do you have selected in the UI? I can deref the portal atom and get selected values from vs-code.

mschmele21:12:58

simple, non-nested values seem to be fine, but anything nested seems to not work

seancorfield22:12:20

@mschmele I just tested it on my VS Code/Clover/Portal setup and it works fine.

mschmele22:12:47

Weird. Thanks for investigating! I'll have to look into it tomorrow morning