Leo for VSCode: LeoInteg 0.1.17 (second beta) Released!

93 views
Skip to first unread message

Félix

unread,
Aug 16, 2021, 1:48:00 AM8/16/21
to leo-editor

banner-blur-narrow.png
Leonistas of the world can now try out the second beta release!

I'm delighted to announce that leointeg (Leo for VSCode) is now at its second 'beta' release, and offered as an '.vsix' extension file, where most features are present -- but in dire need of some user testing to finalize and polish before a launch on the official vscode/microsoft store!

No more annoying development version installation fuss!

Way more easy to install and run! Just download the extension here, and in vscode, do the 'install from VSIX' command from the command palette. 

Known Issues

So far, I've noticed that when newly installed and used for the first time, I have to restart vscode. (This may have been fixed in this second release but remains to be tested.)

Thanks for testing and reporting issues and bugs! 

Please download and tryout leointeg to help bring a real '1.0' version by helping finding bugs, or how to reproduce possible bugs by reporting your thoughts here: https://github.com/boltex/leointeg/issues

Make sure you're somewhat familiar with VSCode first!

Edit and debug a project in your favorite language with vscode first if you're not already familiar with this IDE. Begin by watching a couple of videos here
and follow through with your preferred language example tutorial:

Java

THANK YOU FOR TRYING OUT LEOINTEG !
--
Félix

Edward K. Ream

unread,
Aug 16, 2021, 6:13:40 AM8/16/21
to leo-editor
On Mon, Aug 16, 2021 at 12:48 AM Félix <felix...@gmail.com> wrote:

Leonistas of the world can now try out the second beta release!

Congratulations on all the work you have done!

I installed leointeg from git as usual. The installation went fine.

Starting vs-code with `code .` from the leointeg folder was much quicker than before.

I immediately noticed screen flash when switching nodes.  It looks like the vs code "background" appears briefly!  The background will change depending on which other (vs-code) panes are visible. When only one body pane text is visible, the flash is (I think) the standard vs-code welcome screen, with the big "paper clip" logo.  At other times, other panes bleed through, with various widgets briefly visible.

Félix, do you see this flash?

Edward

Edward K. Ream

unread,
Aug 16, 2021, 6:16:22 AM8/16/21
to leo-editor
On Monday, August 16, 2021 at 5:13:40 AM UTC-5 Edward K. Ream wrote:

I installed leointeg from git as usual. The installation went fine.

I pulled master and did npm install.

Edward

Félix

unread,
Aug 16, 2021, 9:02:04 PM8/16/21
to leo-editor
> I pulled master and did npm install.

Please install the real vsix compiled extension file instead.

For testing purposes, I would not recommend using via the git repo with the run and debug command from vscode (F5) instead of simply installing the plugin with the vsix file. 

Main reason is that there are small differences when launching the server internally because a debugging external host is different from a standalone instance of vscode. (for when the tk window pops up if you forgot unsaved files and other server behavior while being spawned from a 'parent' nodejs process.)

On top of that, while having the real extension installed through the vsix file, nothing prevents you from developping and running a development (cloned git repo) version with F5, If you modified it, it will replace the real extension in that debugging extension host while it runs. So there no inconvenience in installing and running from the real compiled extension file. (btw the vsix file format is just a renamed zip file, so you can inspect it and see its exactly the extension form source.)

Also, you don't have to uninstall the 0.1.16 (older) version when installing the new beta, it will just replace it automatically. It will also replace it automatically when I release a 1.0 through the microsoft store.

Thanks again to all beta testers!

(Eager to hear about how the git-diff and rst3 command work from other leonistas!)
--
Félix

Viktor Ransmayr

unread,
Aug 16, 2021, 11:13:51 PM8/16/21
to leo-editor
Hello Felix,

Félix schrieb am Montag, 16. August 2021 um 07:48:00 UTC+2:
Leonistas of the world can now try out the second beta release!

I'm delighted to announce that leointeg (Leo for VSCode) is now at its second 'beta' release, and offered as an '.vsix' extension file, where most features are present -- but in dire need of some user testing to finalize and polish before a launch on the official vscode/microsoft store!

I successfully tested the 'rst3' command in the second beta release.

Thanks a lot for the quick fix of this reported issue !

With kind regards,

Viktor

tbp1...@gmail.com

unread,
Aug 16, 2021, 11:44:31 PM8/16/21
to leo-editor
I also have tested the rst3 command with success.  Also, my Sphinx build script ran correctly with CNTL-B after the rst3 command created the rst file for Sphinx to use..

Alexey Tikhonov

unread,
Aug 26, 2021, 2:50:20 AM8/26/21
to leo-editor
There is a strange thing with the command "extract", which often (but not always) happens:

I want to extract a highlighted part of code to a new node:

    @others
    type(t_string) elemental function ctorFromLogical(l) result(res)
        !dec$ attributes dllexport :: ctorFromLogical
        logical, intent(in) :: l
        res = l
    end

    a line from the next fragment

 To do this I:
1. Insert a new line before the code fragment with the desired name of the node to be created:

    @others
    func ctorFromLogical
    type(t_string) elemental function ctorFromLogical(l) result(res)
        !dec$ attributes dllexport :: ctorFromLogical
        logical, intent(in) :: l
        res = l
    end

    a line from the next fragment

2. select the fragment:

    @others
    func ctorFromLogical
    type(t_string) elemental function ctorFromLogical(l) result(res)
        !dec$ attributes dllexport :: ctorFromLogical
        logical, intent(in) :: l
        res = l
    end

    a line from the next fragment

3. execute command "extract" (or use key-combo ctrl+shift+d) and get the following:

LeoInteg creates a node with title:

    type(t_string) elemental function ctorFromLogical(l) result(res)

and with the content:

        !dec$ attributes dllexport :: ctorFromLogical
        logical, intent(in) :: l
        res = l
    end

    a line from the next fragment

It seems that LeoInteg passes to the server a fragment of text with shifted lines: it skips the line that should become the title of the new node, and grabs an extra line below the selection.

Alexey

Edward K. Ream

unread,
Aug 26, 2021, 6:13:25 AM8/26/21
to leo-editor
On Thu, Aug 26, 2021 at 1:50 AM Alexey Tikhonov <tickli...@gmail.com> wrote:

There is a strange thing with the command "extract", which often (but not always) happens:

Thanks for this excellent testing.  leoserver.py does not contain any special code for the "extract" command, so this may be a bug in Leo.

I wonder whether the preceding "@others" line has anything to do with the problem.

Edward

tbp1...@gmail.com

unread,
Aug 26, 2021, 9:34:12 AM8/26/21
to leo-editor
I could not repro this exactly, but the result was not quite right, either.  Using the same steps, I got a new node with the expected  headline func ctorFromLogical. The body of the function did not contain the extra fragment line at the bottom, but it also did not contain the  first line  func ctorFromLogical as it should have.

Leo 6.4b2, 6.4 branch, build ee0a3334b4
2021-08-16 04:32:32 -0500
Python 3.9.5, PyQt version 5.15.2
Windows 10 AMD64 (build 10.0.19043)
 


Félix

unread,
Aug 26, 2021, 9:16:12 PM8/26/21
to leo-editor
Thank you Gaurami, 🦁

And thanks to all who has commented here about shifts in the text selection range being detected in vscode, and given to Leo prior to executing a command. (in this instance, 'extract', but it could also apply to other commands such as execute script Ctrl+B, and others)

So another check you might wanna do and report here is , lets say you have body text consisting of this: 
g.es('1')
g.es('2')
g.es('3')
g.es('4')
... and so on

You could try to rapidly select a random chunk of lines and see if CTRL+B runs those lines (although it's different than extract, as extract doesn't care where the exact selection starts or ends precisely on which character on a line, it just cares about if a line is in or out.

I'll create an issue and setup experiments to figure out how to correct the detection of the selected text range and its setup in Leo. (There is also a conversion algorithm applied in between because on one side it's just a string position, and on the other it's a row and col duo.) So there's a couple places things can go wrong. 

'Thought I'd fix it for good the last time I made this part of leointeg/leoserver but looks like  Gaurami got me good :)
--
Félix

p.s. another test people could try to do and report here is : do a find-text (ctrl+f) with a long chunk of text... Does leoInteg correctly selects the text in the body pane? if it'S always correct that means the bug in translation of the selected text range is only on one-way (from leointeg to leoserver) 

tbp1...@gmail.com

unread,
Aug 26, 2021, 11:21:00 PM8/26/21
to leo-editor
My test was only in Leo, it did not involve leointeg at all.  It sounds like there may be a problem with each of them ...
Reply all
Reply to author
Forward
0 new messages