You didn't ask for it but it's here anyways! LeoInteg 0.1.12

80 views
Skip to first unread message

Félix

unread,
Jul 4, 2020, 12:01:27 AM7/4/20
to leo-editor
New features have been combined and released on the master branch: Multi-file support, new view panel of opened Leo documents (bottom left corner), color-syntax, run selected-text as script, copy-paste from one Leo file to the other and more!

See LeoInteg, the Leo Integration Extension for vscode at  https://github.com/boltex/leointeg#-leo-editor-integration-with-visual-studio-code



New document view shows dirty state with the icon darkness/lightness and has relevant icons shortcuts (see detail screenshot below)

To view development progress, checkout https://github.com/boltex/leointeg/projects/1 instead :) 
--
Félix


Edward K. Ream

unread,
Jul 4, 2020, 6:21:07 AM7/4/20
to leo-editor
On Fri, Jul 3, 2020 at 11:01 PM Félix <felix...@gmail.com> wrote:

New features have been combined and released on the master branch: Multi-file support, new view panel of opened Leo documents (bottom left corner), color-syntax, run selected-text as script, copy-paste from one Leo file to the other and more!

This is great stuff! Installation was a snap.

I do see some syntax coloring, but python keywords such as "def" and "class" are not colored. True in both the "dev" and "main" branches.

Ctrl-B works when the script is g.es('hello'). Nothing seems to happen when the script is print('hello'). I've looked in the obvious places. Am I missing something?

Edward

Félix

unread,
Jul 4, 2020, 3:10:09 PM7/4/20
to leo-editor
Hi! (sorry big screenshots incoming!)

In Leo, print does nothing as far I as I can tell. (i've wondered since 2002 when i discovered Leo why print is not redirected to g.es by default) - see screenshot only the "g.es" output is visible.



In leoInteg, print outputs on the stdout as would any script., so its visible in the leobridgeserver.py terminal output.

(In the screenshot below, you can see the "ABC" in the leo log pane, and the "123" got outputted behind, in the leointeg source window's terminal.



Please advise as to what is supposed to happen/be visible in both instances. 

Also, when trying to improve leointeg's keyboard use and navigation, I'm going to do a bunch of comparison to have some command leave focus on the outline pane instead of the body in some circumstances. (I'm going to have to systematically try out stuff in Leo and take notes as not every command originating with focus in one place necessarily leaves the focus at the same place) 

But for now, I'll continue making the video (the "intro to Leo" redone in leoInteg with auto-sync derived files added to it.)

Please dont hesitate to comment and propose ideas ! thanks!
--
Félix

Félix

unread,
Jul 5, 2020, 12:51:15 AM7/5/20
to leo-editor
I do see some syntax coloring, but python keywords such as "def" and "class" are not colored. True in both the "dev" and "main" branches.
Yeah, language specific coloring, is still on the todo as issue #56. Only generic 'Leo' plain language coloring is done so far.

Edward K. Ream

unread,
Jul 5, 2020, 5:46:12 AM7/5/20
to leo-editor
On Sat, Jul 4, 2020 at 11:51 PM Félix <felix...@gmail.com> wrote:
>> I do see some syntax coloring, but python keywords such as "def" and "class" are not colored.

> Yeah, language specific coloring is still on the todo as issue #56. Only generic 'Leo' plain language coloring is done so far.

OK. I'll be patient :-)

Edward

Edward K. Ream

unread,
Jul 5, 2020, 5:56:51 AM7/5/20
to leo-editor
On Sat, Jul 4, 2020 at 2:10 PM Félix <felix...@gmail.com> wrote:

> In Leo, print does nothing as far I as I can tell. (i've wondered since 2002 when i discovered Leo why print is not redirected to g.es by default)...

Both print and g.trace print to the console, provided that you run Leo from a console, which I always do.

> In leoInteg, print outputs on the stdout as would any script., so it's visible in the leobridgeserver.py terminal output.

leoGlobals.py defines the g.RedirectClass class and several convenience functions. These redirect g.es to the Leo's log pane.

At present Leo's bridge calls neither g.redirectStderr() nor redirectStdout(). It may be possible to do that from the leoInteg end, but if not I could add more keywords to BridgeController's ctor to do the redirection.

I do see Leo's log pane in vs-code, so I suspect just calling g.redirectStderr() or redirectStdout() should suffice.

Edward

Félix

unread,
Jul 5, 2020, 6:53:41 PM7/5/20
to leo-editor
hmm...  What I meant by that is that since I try to mimic Leo, i dont necessarily want the print to output in the log pane, and just have 'print' output to the stdout/terminal as I already do. 

Can you confirm that ctrl+b on scripts that do 'print("blabla")' actualy does output to the terminal that runs leobridgeserver.py as per the screenshots in the post above (in the window behind the other one in the large screenshot)?

I'm asking this because you originally stated : 
 Nothing seems to happen when the script is print('hello'). I've looked in the obvious places. Am I missing something?

And i'm a bit confused by what you meant exactly by this... :)
--
Félix

Edward K. Ream

unread,
Jul 6, 2020, 6:32:44 AM7/6/20
to leo-editor
On Sun, Jul 5, 2020 at 5:53 PM Félix <felix...@gmail.com> wrote:
hmm...  What I meant by that is that since I try to mimic Leo, i dont necessarily want the print to output in the log pane, and just have 'print' output to the stdout/terminal as I already do. 

Can you confirm that ctrl+b on scripts that do 'print("blabla")' actualy does output to the terminal that runs leobridgeserver.py as per the screenshots in the post above (in the window behind the other one in the large screenshot)?

Neither Ctrl+b nor Leo: Execute Script from the Command Palette appear to do anything. I've looked everywhere :-)

BTW, in the "original" Terminal window, I see "Terminal will be reused by tasks, press any key to close it."

Edward

Félix

unread,
Jul 6, 2020, 7:27:22 AM7/6/20
to leo-editor
That's the webkit compilation terminal, to be closed at any key press to reveal the server-script launch terminal underneath. there Is also a toggle to switch from one terminal to the next in the upper right corner of vscode terminal pane.

Hope this helps. Please check if you can reproduce what's in the screenshot above.

Many thanks again!

Edward K. Ream

unread,
Jul 6, 2020, 8:45:47 AM7/6/20
to leo-editor
On Mon, Jul 6, 2020 at 6:27 AM Félix <felix...@gmail.com> wrote:

That's the webkit compilation terminal, to be closed at any key press to reveal the server-script launch terminal underneath. there Is also a toggle to switch from one terminal to the next in the upper right corner of vscode terminal pane.

Hope this helps. Please check if you can reproduce what's in the screenshot above.

I've tried all the obvious places and all the dropdown boxes.  When Terminal is active, I see a dropdown with only two entries: "Powershell" and "Select Default Shell". If I try to select "Command Prompt" as the default shell I get:

"Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again".

There may be a problem with this line in the settings.

 "leoIntegration.leoPythonCommand": "python",

No idea why, but it has two underlines under it.

Edward

Félix

unread,
Jul 6, 2020, 11:00:55 PM7/6/20
to leo-editor

 
No idea why, but it has two underlines under it.

If you hover over this line, vscode will perhaps state it's an unknown configuration setting. Thats because leoInteg is not a 'real' compiled extension, and the settings you set with leoInteg get written in your user settings files automatically by vscode (I dont write in it, I set a 'user setting' and vscode writes automatically in you settings file. ) 

If it could not maybe you had it opened in another editor? or something strange was preventing writing in it... 

Try this, (close everything - start from scratch) in your normal vscode window, press [CTRL+, ] to open your user settings, switch to the JSON view if not already in json text mode, (upper right corner button) , then start leoInteg (and its server in your preffered way) , 

Now, in the extension host window, open the welcome / settings webview and change a setting to see it change automatically in the json in the original normal vscode instance (from the previous window)



This should work without issues - please report anything that seems broken, it's very much appreciated!

Also, i suspect that one of the ways to run a leobridge server may not let the 'print' statements through, that would explain why I see them in the leobridgeserver terminal's output, and you dont, (as opposed to the g.es that come out fine in the log pane for everyone)

Thanks again! 
(Sorry for the tangled answers - i'm still too busy being eager to finish the 'keyboard navigation' fixes that i'm working on, it just brings leoInteg to feel so much more like Leo ! cant wait to push my changes for you guys to try this out)
--
Félix

Edward K. Ream

unread,
Jul 7, 2020, 9:57:41 AM7/7/20
to leo-editor
On Mon, Jul 6, 2020 at 10:00 PM Félix <felix...@gmail.com> wrote:

Try this, (close everything - start from scratch) in your normal vscode window, press [CTRL+, ] to open your user settings, switch to the JSON view if not already in json text mode, (upper right corner button) , then start leoInteg (and its server in your preffered way) , 

Apparently we can ignore this for now.  Ctrl+ complains about the leoInteg settings, even when I load another folder (not leoInteg) initially.

Edward
Reply all
Reply to author
Forward
0 new messages