Leo Integration Into vsCode : New master version release!

126 views
Skip to first unread message

Félix

unread,
Jan 28, 2020, 12:25:59 AM1/28/20
to leo-editor
Hello to all Leo and vsCode users out there! 🦁

I made another release of leoInteg intended this time again for asking all of you to try out and test more features: Full outline and body editing! 

Checkout the welcome screen that lets you change settings, all outline and body editing commands, undo, ... and a lot more, see the readme at the projects home page: https://github.com/boltex/leointeg

Sorry : Save / Derive files is only coming next release! 

Many thanks to any of you that try it out and give me feedback. Any positive or negative feedback about any issue is greatly appreciated! 
--
Félix

Edward K. Ream

unread,
Jan 30, 2020, 10:02:59 AM1/30/20
to leo-editor
On Monday, January 27, 2020 at 11:25:59 PM UTC-6, Félix wrote:
Hello to all Leo and vsCode users out there! 🦁

I made another release of leoInteg intended this time again for asking all of you to try out and test more features: Full outline and body editing! 

Checkout the welcome screen that lets you change settings, all outline and body editing commands, undo, ... and a lot more, see the readme at the projects home page: https://github.com/boltex/leointeg

This is great stuff. It took me awhile to get everything working. Some notes:

1. Running npm install gave one severe security error. I was going to report it, but I forgot and closed the console. Running npm install again now gives only 4 minor warnings.

2. Your installation directions are excellent. It took awhile for me to follow them exactly ;-)

Confusion

I had considerable trouble with sys.path. After futzing around the following worked.

- It appears that the code only uses the PYTHONPATH system var. Setting sys.path in other ways does not appear to work.

- I added <path to leo-editor> and <path to websockets> (that is, path to site-packages) to PYTHONPATH.

With these paths the extension works. Aha!  `F1 leo settings` reveals the Leo Lion.

Recommendation: delete the link "(See Adding Leo to Your Path in github.com/leo-editor/leo-editor/blob/master/INSTALL.TXT)" from the installation notes. It seems to imply that you can avoid setting PYTHONPATH, but that does not appear to be so.

I'm still struggling with considerable confusion.  Surely much of this confusion is due to not understanding VS Code very well.

1. For example, it's confusing to have two VS Code windows open, one labelled "Welcome-leointeg-VS Code" and the other labelled "[Extensions Development Host] LEO:Body <node name>".

2. In the "[Extensions Development Host]" window it's confusing to have three top-level "nodes" at the left called "Leo", "Outline" and "Leo Outline". Opening the "Outline" pane shows only "The active editor cannot provide outline info". No idea what this means, and it doesn't seem to matter. Everything else appears to work just fine. For example, the "Leo outline" area shows my copy of leoPy.leo, just as it appears in Leo itself, complete with clone marks!

Not likely a big deal. If we were cubicle mates I could come up to speed in a few minutes...

Summary

This is the first time I have gotten leointeg to work. The installation instructions and examples at https://github.com/boltex/leointeg are excellent.

leointeg is tremendously exciting. VS Code is a huge ecosystem. There is no way one person could emulate all the VS Code plugins and features. With leointeg fully functional I might actually be tempted to work in VS Code instead of Leo...

Edward

Edward K. Ream

unread,
Jan 30, 2020, 12:53:07 PM1/30/20
to leo-editor
On Thursday, January 30, 2020 at 9:02:59 AM UTC-6, Edward K. Ream wrote:

> 1. Running npm install gave one severe security error.

Found it:

npm WARN notice [SECURITY] set-value has the following vulnerability: 1 high. Go here for more details: https://www.npmjs.com/advisories?search=set-value&version=2.0.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.

So I just did `npm i npm@latest -g`.  `npm audit` yields

npm ERR! code EAUDITNOPJSON
npm ERR
! audit No package.json found: Cannot audit a project without a package.json

I assume that none of this is worrisome.

Edward

Edward K. Ream

unread,
Jan 30, 2020, 1:37:47 PM1/30/20
to leo-editor
On Monday, January 27, 2020 at 11:25:59 PM UTC-6, Félix wrote:

> Checkout the welcome screen that lets you change settings, all outline and body editing commands, undo, ... and a lot more

Two problems:

1. Trying to edit body text crashes: I see "websocket closed, code: 1006. After that the outline goes away. So leointeg is not quite ready for prime time :-)

2. There is a glitch with the settings. I toggled all the settings in the "Node Commands" section. I saw the expected outlines, but then I couldn't turn them all off.  Imo, this is not a great set off options anyway. It would be simpler just always to add the appropriate popup menu for each node. A small matter.

Edward

Félix

unread,
Jan 30, 2020, 1:52:35 PM1/30/20
to leo-editor
I'm very happy and honored to have feedback on my project from Edward himself! 

I'll adress more issues later when i have more time - but a quick one would be this last point : I forget to mention that the 'edit headline' button is permanent and cannot be removed. (in case thats the icon that you felt should have been gone when unchecking all boxes) 

So more to come later tonight!
--
Félix

Edward K. Ream

unread,
Jan 30, 2020, 1:53:27 PM1/30/20
to leo-editor


On Thursday, January 30, 2020 at 12:37:47 PM UTC-6, Edward K. Ream wrote:
On Monday, January 27, 2020 at 11:25:59 PM UTC-6, Félix wrote:

> Checkout the welcome screen that lets you change settings, all outline and body editing commands, undo, ... and a lot more

Here is the terminal log. I have no idea whether the warnings are significant:

> Executing task: npm run webpack <


> leointeg@0.1.8 webpack C:\leo.repo\leointeg
> webpack --mode development

Starting type checking service...
Using 1 worker with 2048MB memory limit
Child
   
Hash: ce88cf0b433aca827f95
   
Version: webpack 4.41.5
   
Time: 3774ms
   
Built at: 2020-01-30 12:49:51
               
Asset     Size  Chunks                   Chunk Names
        extension
.js  255 KiB    main  [emitted]        main      
    extension
.js.map  340 KiB    main  [emitted] [dev]  main      
   
Entrypoint main = extension.js extension.js.map
   
[./src/constants.ts] 1.12 KiB {main} [built]
   
[./src/extension.ts] 9.76 KiB {main} [built]
   
[./src/leoBody.ts] 9.27 KiB {main} [built]
   
[./src/leoBridge.ts] 5.26 KiB {main} [built]
   
[./src/leoFiles.ts] 2.21 KiB {main} [built]
   
[./src/leoIntegration.ts] 62.3 KiB {main} [built]
   
[./src/leoNode.ts] 2.4 KiB {main} [built]
   
[./src/leoOutline.ts] 2.41 KiB {main} [built]
   
[./src/serverService.ts] 3.33 KiB {main} [built]
   
[./src/webviews/leoSettingsWebview.ts] 4.3 KiB {main} [built]
   
[child_process] external "child_process" 42 bytes {main} [built]
   
[fs] external "fs" 42 bytes {main} [built]
   
[os] external "os" 42 bytes {main} [built]
   
[path] external "path" 42 bytes {main} [built]
   
[vscode] external "vscode" 42 bytes {main} [built]
       
+ 23 hidden modules

    WARNING
in ./node_modules/ws/lib/buffer-util.js
   
Module not found: Error: Can't resolve 'bufferutil' in 'C:\leo.repo\leointeg\node_modules\ws\lib'
     @ ./node_modules/ws/lib/buffer-util.js
     @ ./node_modules/ws/lib/receiver.js
     @ ./node_modules/ws/index.js
     @ ./src/leoBridge.ts
     @ ./src/leoIntegration.ts
     @ ./src/extension.ts

    WARNING in ./node_modules/ws/lib/validation.js
    Module not found: Error: Can'
t resolve 'utf-8-validate' in 'C:\leo.repo\leointeg\node_modules\ws\lib'
     
@ ./node_modules/ws/lib/validation.js
     
@ ./node_modules/ws/lib/receiver.js
     
@ ./node_modules/ws/index.js
     
@ ./src/leoBridge.ts
     
@ ./src/leoIntegration.ts
     
@ ./src/extension.ts
Child
   
Time: 3775ms
   
Built at: 2020-01-30 12:49:51
             
Asset      Size       Chunks             Chunk Names
    main
-styles.css  27.9 KiB  main-styles  [emitted]  main-styles
     main
-styles.js  4.48 KiB  main-styles  [emitted]  main-styles
      settings
.html  14.7 KiB               [emitted]
        settings
.js  59.8 KiB     settings  [emitted]  settings

Terminal will be reused by tasks, press any key to close it.


Edward

Félix

unread,
Jan 30, 2020, 1:55:30 PM1/30/20
to leo-editor
last thing on my mind for now: I made a small but impactfull last-minute (untested) change to body edition just before releasing this... And now you're reporting that you had it crash while editing a body pane... So I'm feeling a bit silly about this but not surprised at all! (I'll fix this very soon and make a 'quick small bug fix update' soon before making other 'real' releases with added features)
--
Félix

On Thursday, January 30, 2020 at 1:37:47 PM UTC-5, Edward K. Ream wrote:

Edward K. Ream

unread,
Jan 30, 2020, 2:01:46 PM1/30/20
to leo-editor
On Thu, Jan 30, 2020 at 12:52 PM Félix <felix...@gmail.com> wrote:
I'm very happy and honored to have feedback on my project from Edward himself! 

I'll address more issues later when i have more time - but a quick one would be this last point : I forget to mention that the 'edit headline' button is permanent and cannot be removed. (in case thats the icon that you felt should have been gone when unchecking all boxes) 

The edit headline "pencil" icon is fine. Actually, they all would be fine if they worked :-)

There isn't much of a memory at present. This causes quite a bit of confusion.

1. Sometimes when I open VS Code the leointeg plugin is available. Sometimes not. Now I know that I have to go to the leointeg folder and open it using VS Code.

2. Leointeg never seems to remember the previously opened outline.

These can be handled later. They are to be expected in pre-alpha code.

leointeg is already a very impressive piece of software. The UI design seems quite reasonable.  Much of what I am doing now is becoming acquainted with VS Code itself, including the key bindings.

Edward

Félix

unread,
Jan 30, 2020, 4:41:06 PM1/30/20
to leo-editor
Just a thought: I'm still at work for a while, gotta put some stuff in production tonight,... So for today, I guess I just want to add, to anyone willing to try this extension, to go to this page : https://code.visualstudio.com/api/get-started/your-first-extension and try this out. 

It will introduce you in a much softer way to the concept of trying out extensions in development mode, (as opposed to a finished extension package that installs itself in vscode and does not require another instance to run/debug and so on)

It will take any of you 5-10 minutes, its 'fun', and it will introduce to you some concepts that are not evident to introduce for me in a detailed manner.

Thank again !! (and sorry for my english : i'm french!)
--
Félix

Edward K. Ream

unread,
Jan 31, 2020, 5:24:21 AM1/31/20
to leo-editor
On Thu, Jan 30, 2020 at 3:41 PM Félix <felix...@gmail.com> wrote:

Just a thought: I'm still at work for a while, gotta put some stuff in production tonight,... So for today, I guess I just want to add, to anyone willing to try this extension, to go to this page : https://code.visualstudio.com/api/get-started/your-first-extension and try this out. 

Thanks. This is a good start. I like to slow down the videos by pausing them :-)

Edward

Félix

unread,
Feb 2, 2020, 9:49:51 PM2/2/20
to leo-editor
Just replying on this thread in case it helps someone. (before amending the repo with definitive changes to address this issue in particular) 

- The ctrl-R shortcut to move a node right somewhat is problematic when running / debuging this expansion, because, then its also mapped to 'reload window' command to refresh the debugging session as a whole. :( so this might have been seen as a 'Crash' by anyone testing this. (this doesnt happen when having a Leo node selected, but it can happen otherwise easily having the focus on some other vscode workspace part.) 

This is a problem only while this expansion is run in debug mode. It would not be happening if ran as a finished & compiled packaged expansion.

I'm in the process of cleaning up the repo and listing specific issues before starting a major rewrite/refactor, but I just thought I'd comment about this here. 

Edward K. Ream

unread,
Feb 3, 2020, 4:48:49 AM2/3/20
to leo-editor
On Sun, Feb 2, 2020 at 8:49 PM Félix <felix...@gmail.com> wrote:
I'm in the process of cleaning up the repo and listing specific issues before starting a major rewrite/refactor, but I just thought I'd comment about this here. 

Thanks for these notes. Keep up the good work :-)

Edward
Reply all
Reply to author
Forward
0 new messages