I have spent several pleasant hours playing with leointeg. There are still problems.
The following are based on detailed notes I took as I worked:
1. The
leointeg video was extremely valuable. I don't want to see screen shots in Leo issues, because I am so familiar with Leo. But here, in a completely new environment, seeing vs-code in action was exactly what a newbie such as myself needs.
Félix, would you be interested in creating a similar video for Leo itself? It would guide people to installing and running Leo the first time.
2. I wasted an hour or more not following the video's instructions. It's
crucial to install the
latest version of node.js, namely 12.18.0. I downloaded node.js from
https://nodejs.org/en/download/.
It's probably also wise to update to the latest version of vs-code as well. I am running 1.46.0.
3. One thing not shown in the video. When installing node.js, do NOT install the optional tools! If you do, you will likely install python 3.8 in a most inconvenient manner. I eventually backed out of the 3.8 installation.
5. On my machine, there is no way to open the leointeg folder using "Open with Code", probably because I didn't install vs-code additions to the file browser. No problem. I just used vs-code's "Open Folder" option.
6. From the terminal (in vs-code), I did npm install, as shown in the video. It worked as shown in the video.
BTW, the video doesn't make clear (to a newbie) how you opened the terminal. I opened the terminal from the Terminal menu.
7. As shown in the video, I clicked the "Run Extension" triangle. Very clear.
I assume F5 would have done the same thing, but it's easier to show clicks in a video.
Success! For the first time ever most everything works. I see "Starting type checking service..."
In the debug console I see:
leoInteg upgraded from v0.1.9 to v0.1.10.
leoInteg startup launched in 5 ms.
8. I now see two windows.
- It was helpful for the video to show the windows being resized. That resizing made clear that there are, in fact, two separate windows.
- I see the Leo Lion in one of the windows. Some debugging messages appear in the other window.
9. Starting the server from within vs-code fails:
Starting server with command : py -3 c:\leo-repo\leointeg\leobridgeserver.py
Websocket error: connect ECONREFUSED 127.0.0.1:32125
I suspect the problem is related to "py -3".
10. Starting the server in a separate console works:
> cd c:\leo-repo\leointeg
> python leobridgeserver.py
Now I see an "Open Leo File" button in vs-code!
11. Choosing LeoDocs.leo shows the outline.
I see this server message in the separate console window:
Leo file opened. Its outline contains 2579 nodes positions.
Testing app.test_round_trip_positions for all nodes: Total time: 0.047 sec.
12. Editing the outline fails. I see this in the separate console window:
Caught Websocket Disconnect Event
Stopping leobridge server
Summary
The video was incredibly helpful. It would be great if Leo had something similar.
Following the installation instructions is mandatory :-) Beware of installing separate node.js tools.
I was not able to start the server from within vs-code. I was able to install the server from a separate console.
I was able to load a .leo file. Changing the file disconnected vs-code from the server.
This is all great progress. Many thanks, Félix, for the plugin and the video.
As I mentioned in another thread, it would be most helpful to know all possible details of what the server does and how it does it.
Edward