Hi Matt, Thanks again for your contributions that will greatly improve leoIntegs documentation, and handling of Miniconda/Anaconda python installations people might have.
I just noticed you ran "npm audit fix" after running "npm install" so i'm not sure what dependency might have been raised to a version that might be problematic. To try without those upgrades, just delete the node_modules folder to reset all dependencies, make sure to revert to a clean master or dev branch commit state, (no modifications of package.lock.json etc.) and then run npm install (without running "npm audit fix") Also, (as stated elsewhere), I also forgot to mention Leo's devel branch should be used with Leo, for multi-file support, until it's next release. Many thanks again! -- Félix On Monday, July 6, 2020 at 12:56:34 AM UTC-4, Matt Wilkie wrote: > > *My notes from getting vscode and Leointeg working today. Both tools are > completely new to me.* > > Chocolatey and Miniconda/Anaconda setup recipe for leointeg, a plugin to > enable Visual Studio Code to use Leo Editor as an engine for working with > outlines and nodes and clones. > > > > Starting point: a Win10 admin command prompt with Chocolatey installer, > Conda, and Git in PATH. I pinned python to 3.6 as that is Leo's current > minimum python version. Adjust to suit your preference. > > > > Admin prompt > > > > :: Install Visual Studio Code & python support, Node.js > > choco install vscode vscode-python nodejs > > > > Normal command prompt: > > > > :: Create anaconda environment for Leo & Leo-integ > > conda create -n vscode-leo > > conda activate vscode-leo > > conda install python=3.6 > > > > :: Install Leo & dependencies > > pushd code > > pip install --editor .\leo-editor > > > > :: Install Leointeg python dependencies > > pip install websockets > > > > :: Install Leointeg & Node.js dependencies > > git clone https://github.com/boltex/leointeg > > cd leointeg > > npm install > > npm audit fix > > > > Run vscode > > > > Open Folder >> path\to\leointeg > > "This workspace has extension recommendations" >> Install All > > > > Open command pallete [Ctrl-Shift-P] > > - type "select inter" and chose "Python: Select interpreter" from the > list. Status bar will indicate search for and caching of python > environments, followed by list of conda environments. >> Choose the > leointeg one, e.g. > > > > c:\tools\miniconda3\envs\vscode-leo\python.exe > > > > - Using same technique, change 'Default Terminal' to Command Prompt > instead of Powershell. (Apparently if you use Powershell there's more > manual things to do.) > > > > Run Extension > > - [Ctrl-Shift-D] to open debugger side panel, then > - Press play button (right pointing green triangle) - [F5] > > > > Vscode will open a new window in foreground. The background vscode window > should have a highlighted bottom status bar and show the leointeg conda > python environment. > > > > The foreground window should be titled "Extension Development Host". From > it Open Folder and point to your Leo stuff. A "Welcome to Leointeg" page > opens. > > > Switch back to the original vscode window. Open a terminal in vscode > [Ctrl-Shift-`] and start the leobridge server manually. > > > > python leobridgeserver.py > > > > Now switch to the dev host and in left hand menu >> Leo Integration >> > [Connect to Server]. > > > > When connection is established an [Open Leo File] button should replace > [Connect to Server]. > > > > …. > > > > *When things don't work, look to the [Debug Console] panel in the original > Vscode window. * > > > > *What seems to be needed in every new vscode session:* > > > > 1. *Selecting the python interpreter* > 2. *Running "python leobridgsever.py" * > > > > *I'm confident there's a way to automate this, somewhere.* > > > > > > Sources > > - How to run the Leointeg extension: > https://github.com/boltex/leointeg/blob/master/CONTRIBUTING.md > - Setting and using Python environments in Vscode: > https://code.visualstudio.com/docs/python/environments > > > > > > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/9f910038-9b5f-4540-b2de-8fb22d5ee821o%40googlegroups.com.
