leointeg activation 'trigger'

21 views
Skip to first unread message

Félix

unread,
Jun 12, 2021, 12:15:51 AM6/12/21
to leo-editor
"activationEvents": [
     "onView:leoIntegration",
      "workspaceContains:**/*.leo"
],

This little chunk of JSON is something I had set 2 years ago forgot: I just remembered that i have set it's activation on 2 events : either the opened workspace has a leo file in it, or the user clicks on the leo icon on the side. (activity bar) 

That explains why Thomas proposed to Edward to click the icon if nothing was showing up if he had no Leo file in the workspace of his vscode window.  (that prompted me to wonder if a bug had appeared - turns out it was normal)

Should i change this to have it start by default with vscode all the time? I guess so because now vscode offer to disable / enable extension on a workpace basis - and its easy to switch back and forth...

I'll switch it on by default for now :)
--
Félix

Edward K. Ream

unread,
Jun 12, 2021, 6:18:11 AM6/12/21
to leo-editor
On Fri, Jun 11, 2021 at 11:15 PM Félix <felix...@gmail.com> wrote:
"activationEvents": [
     "onView:leoIntegration",
      "workspaceContains:**/*.leo"
],

This is all Greek to me :-) Do what you like.

Edward

tbp1...@gmail.com

unread,
Jun 12, 2021, 7:23:45 AM6/12/21
to leo-editor
I don't quite understand what you wrote :-), but I think what should happen is the least surprising thing.  For me, that is that if I go through the motions of starting the extension, then I will be presented with a view of a Leo file, or an obvious offer to open one.  And the Leo icon should be visible (pace vscode bugs).

I noticed that if I went back to the original vscode window and ran leointeg again, the leobridgeserver got closed and I had to restart it.  I *think* I remember that the original leointeg window closed, too.  If there is any way to prevent these behaviors, it would be good.  It's too easy to try to open a second leointeg window (for any number of reasons;  sometimes I have two Leo windows open at the same time on purpose), and either one should open without disturbing the other, or no new window should open (along with a good message about why not).

Reply all
Reply to author
Forward
0 new messages