{"id":32122430,"url":"https://github.com/boltex/leointeg","last_synced_at":"2025-10-20T20:47:45.820Z","repository":{"id":41402842,"uuid":"202247955","full_name":"boltex/leointeg","owner":"boltex","description":"Leo Editor Integration with VS Code","archived":false,"fork":false,"pushed_at":"2025-10-15T01:48:05.000Z","size":14123,"stargazers_count":82,"open_issues_count":23,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-15T05:28:07.581Z","etag":null,"topics":["leo-editor","literate-programming","outline-editor","vscode"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=boltex.leointeg","language":"Leo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boltex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["boltex"],"patreon":"felixgraphx","custom":["https://boltex.github.io/"]}},"created_at":"2019-08-14T01:14:31.000Z","updated_at":"2025-10-15T01:48:08.000Z","dependencies_parsed_at":"2024-01-09T06:24:16.061Z","dependency_job_id":"a6fc86fc-df76-40b9-a8f1-1b16ffd92eed","html_url":"https://github.com/boltex/leointeg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boltex/leointeg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltex%2Fleointeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltex%2Fleointeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltex%2Fleointeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltex%2Fleointeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boltex","download_url":"https://codeload.github.com/boltex/leointeg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltex%2Fleointeg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279110573,"owners_count":26105906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["leo-editor","literate-programming","outline-editor","vscode"],"created_at":"2025-10-20T20:47:44.556Z","updated_at":"2025-10-20T20:47:45.814Z","avatar_url":"https://github.com/boltex.png","language":"Leo","funding_links":["https://github.com/sponsors/boltex","https://patreon.com/felixgraphx","https://boltex.github.io/"],"categories":[],"sub_categories":[],"readme":"# ![Leo Editor](https://raw.githubusercontent.com/boltex/leointeg/master/resources/leoapp.png) Leo for Visual Studio Code\n\n_If you find LeoInteg useful, please consider [**sponsoring**](https://boltex.github.io/) it. Also please [write a review](https://marketplace.visualstudio.com/items?itemName=boltex.leointeg#review-details \"Write a review\") or [star it on GitHub](https://github.com/boltex/leointeg \"Star it on GitHub\"). (For a JavaScript implementation of the Leo Editor that runs in both VSCode and VSCode for the web, see the [**LeoJS**](https://github.com/boltex/leojs) extension)_\n\n## Literate Programming with _Directed Acyclic Graphs_ ([dag](https://en.wikipedia.org/wiki/Directed_acyclic_graph))\n\n### Break down your code into a structured outline that generates or parses back your source files\n\n\u003e Leo is a fundamentally different way of using and organizing data, programs and scripts. [📺 Introduction Video](https://www.youtube.com/watch?v=SYwlfdEukD4)\n\nSee Leo, the Literate Editor with Outline, at [leo-editor.github.io/leo-editor](https://leo-editor.github.io/leo-editor/)\nor on [github](https://github.com/leo-editor/leo-editor), and VS Code at [code.visualstudio.com](https://code.visualstudio.com/).\n\n![Screenshot](https://raw.githubusercontent.com/boltex/leointeg/master/resources/animated-screenshot.gif)\n\n## Requirements\n\n- Leo Editor 6.8.6 or later\\\n  _Install with :_ `pip install leo`\\\n   _Or with git._ (See [Installing Leo with git](https://leo-editor.github.io/leo-editor/installing.html#installing-leo-with-git))\n\n- Websocket Python Library\\\n  _Should be already installed if Leo was installed with pip_\\\n  _Install with :_ `pip install websockets`\\\n  (See [websockets.readthedocs.io/](https://websockets.readthedocs.io/))\n\n## Python virtual environment (venv)\n\nIf you installed Leo in a Python virtual environment (venv), fill up the **Python venv Path** option instead of the **Leo Editor Path** option in LeoInteg's [Extension Settings](#extension-settings) shown below.\n\n## Features\n\n- UI controls such as a **Leo Outline** in the explorer view, and as a standalone sidebar, **body pane**, **opened documents selector** along with a **Log Window** [output channel](https://code.visualstudio.com/api/extension-capabilities/common-capabilities#output-channel).\n- **Detached Body Panes**, independent of the selected node can be opened with the 'Open Aside' command.\n- Keybindings that match those of the Leo editor, including arrow keys behavior for outline keyboard navigation. (Can be turned off with the **'Leo Tree Browsing'** option setting)\n- **Derived files change detection**. See [External Files](#derive-external-files) below for more details\n- **'@button' panel** for [creating your own commands with @buttons](https://leo-editor.github.io/leo-editor/tutorial-tips.html#use-button-nodes)\n- **Find panel** that reacts to Leo's typical keybindings, Ctrl+F, F2, F3... when focus is in the outline or body pane\n- **Nav and Tag panel** controls are integrated in the Find panel\n- **Undo History panel**, showing all actions and allowing going back, or forward, to any undo states.\n\n## Leo Commands\n\n![Menus](https://raw.githubusercontent.com/boltex/leointeg/master/resources/context-hover-menus.png)\n\nLeoInteg offers an extensive set of integrated commands, accessible through a variety of interfaces — toolbar buttons, dedicated menus, and intuitive keybindings. Those commands are also discoverable via the Visual Studio Code Command Palette. (accessible through F1 or Ctrl+Shift+P)\n\n### Context-Aware Keybindings\n\nThe keybinding architecture is designed to be context-aware. When your focus is within the LeoInteg Body or Outline pane, LeoInteg-specific keybindings take precedence. Shift your focus outside these panes, and Visual Studio Code's native keybindings resume control.\n\n### The Minibuffer\n\nFor those familiar with Leo, the 'minibuffer' serves as the nerve center for command execution. Access it through Alt+X and use the complete set of Leo's commands!\n\n## Keybindings\n\nListed here are the most useful commands and their keyboard shortcuts.\n\n| Outline Commands |                                                                  |\n| :--------------- | :--------------------------------------------------------------- |\n| Undo / Redo      | `Ctrl + Z` \u0026nbsp;\u0026nbsp;/\u0026nbsp;\u0026nbsp; `Ctrl + Shift + Z`          |\n| Insert Node      | `Ctrl + I` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Shift + Insert`         |\n| Insert Child     | `Ctrl + Insert`                                                  |\n| Edit Headline    | `Ctrl + H`                                                       |\n| Mark / Unmark    | `Ctrl + M`                                                       |\n| Copy Node        | `Ctrl + Shift + C`                                               |\n| Cut Node         | `Ctrl + Shift + X`                                               |\n| Paste Node       | `Ctrl + Shift + V`                                               |\n| Delete Node      | `Ctrl + Shift + Backspace` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Delete` |\n| Clone Node       | `Ctrl + Backquote`                                               |\n| Promote / Demote | `Ctrl + {` \u0026nbsp;\u0026nbsp;_and_\u0026nbsp;\u0026nbsp; `Ctrl + }`              |\n\n| Moving Nodes       |                                                                 |\n| :----------------- | :-------------------------------------------------------------- |\n| Move Outline Up    | `Ctrl + U` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Shift [+ Alt] + Up`    |\n| Move Outline Down  | `Ctrl + D` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Shift [+ Alt] + Down`  |\n| Move Outline Left  | `Ctrl + L` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Shift [+ Alt] + Left`  |\n| Move Outline Right | `Ctrl + R` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Shift [+ Alt] + Right` |\n\n_Move-Outline commands need the `Alt` key modifier only when focus is on body pane._\n\n| Changing Focus                  |                                                   |\n| :------------------------------ | :------------------------------------------------ |\n| Toggle Outline/Body             | `Ctrl + T`                                        |\n| Focus on Outline                | `Alt + T`                                         |\n| Focus on Body (in any pane)     | `Alt + D` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Ctrl + G` |\n| Focus on Body (in Outline pane) | `Tab` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Enter`        |\n\n| Common Operations   |                    |\n| :------------------ | :----------------- |\n| Contract All        | `Alt + -`          |\n| Sort Siblings       | `Alt + A`          |\n| Start Search        | `Ctrl + F`         |\n| Quick Find Selected | `Ctrl + Shift + F` |\n| Find Next           | `F3`               |\n| Find Previous       | `F2`               |\n| Replace             | `Ctrl + =`         |\n| Replace then Find   | `Ctrl + -`         |\n| Extract             | `Ctrl + Shift + D` |\n| Extract Names       | `Ctrl + Shift + N` |\n| Execute Script      | `Ctrl + B`         |\n| Minibuffer Palette  | `Alt + X`          |\n\n| Tree Navigation          |                                                              |\n| :----------------------- | :----------------------------------------------------------- |\n| Show the LeoInteg View   | `Ctrl+Shift+L`                                               |\n| Go Anywhere              | `Ctrl+P`                                                     |\n| Go To First Visible Node | `Home` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Alt + Home`             |\n| Go To Last Visible Node  | `End` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Alt + End`               |\n| Tree page up/down        | `PgUp / pgDn`                                                |\n| Go To Next Clone         | `Alt + N`                                                    |\n| Browse Tree              | `Arrow Keys` \u0026nbsp;\u0026nbsp;_or_\u0026nbsp;\u0026nbsp; `Alt + Arrow Keys` |\n| Go To Global Line        | `Alt + G`                                                    |\n\n_With the **'Leo Tree Browsing'** setting enabled by default, the arrows, home, end, pageUp/Down keys will change the outline's selection directly. Using tree navigation shortcuts from the body pane (with the `Alt` key modifier) will place focus in the outline._\n\n| File Commands       |                    |\n| :------------------ | :----------------- |\n| Save Leo Document   | `Ctrl + S`         |\n| New Leo Document    | `Ctrl + N`         |\n| Open Leo Document   | `Ctrl + O`         |\n| Cycle Next Document | `Ctrl + Tab`       |\n| Write File Nodes    | `Ctrl + Shift + W` |\n| Write Dirty Files   | `Ctrl + Shift + Q` |\n\n---\n\n## Derive External Files\n\nUse either of the **Save Leo Document**, **Write File Nodes** or **Write Dirty Files** commands to derive external files for any type of **@file** nodes.\n\n| @\\\u003cfile\\\u003e Kind | Sentinels | @others | .leo Data | Write Only |\n| :------------- | :-------: | :-----: | :-------: | :--------: |\n| @asis          |    ❌     |   ❌    |    ✔️     |     ✔️     |\n| @auto          |    ❌     |   ✔️    |    ❌     |     ❌     |\n| @clean         |    ❌     |   ✔️    |    ✔️     |     ❌     |\n| @edit          |    ❌     |   ❌    |    ❌     |     ❌     |\n| @file          |    ✔️     |   ✔️    |    ❌     |     ❌     |\n| @nosent        |    ❌     |   ✔️    |    ✔️     |     ✔️     |\n\nYou can also create most of those nodes by using the context menu in vscode's explorer or file editors, and choosing the **Import into Leo Outline** command.\n\nThe **Go to Line In Leo Outline** command is also available in the editor context menu to find a specific line in the outline. It will offer to import the file if no type of **@file** nodes are found in the outline for that file.\n\n### File changes outside of Leo\n\nLeo will detect external file changes, and will ask to either **refresh from disk** or **ignore the changes**.\n\n![Derive files](https://raw.githubusercontent.com/boltex/leointeg/master/resources/derived-file.gif)\n\n## Automate External Files Synchronization\n\nThe **change detection** process can be automated to always refresh, or ignore file changes:\nA **notification** will inform you of the action taken instead.\n\n![Auto sync](https://raw.githubusercontent.com/boltex/leointeg/master/resources/auto-sync.gif)\n\n## Extension Settings\n\n### Open the command palette `Ctrl+Shift+P` and start typing `leo settings` to access its _welcome \u0026 settings_ screen\n\n\u003e _(Changes are auto-saved to the user's profile after 0.5 seconds)_\n\n- Control the visibility of the outline pane in the explorer view.\n- Decide how and when to refresh and synchronize content when external files are modified.\n- Show additional icons on outline nodes (Move, delete, mark, copy, paste...)\n- Choose to either focus on the body pane, or keep focus in the outline when a node is selected.\n- Hide or show the \"Open on the side\" command in the context menu to open a node beside the active editor\n- Set preferences for setting the address and port, and for automatically starting, and/or connecting to a Leo server.\n\n![Settings](https://raw.githubusercontent.com/boltex/leointeg/master/resources/welcome-settings.gif)\n\n## Server Settings\n\nAlthough the Leo integration has one instance of the leoserver script per vscode 'project'\nwindow by default, the server settings also has features that allows you to use the same instance\nof Leo in multiple client (vscode) windows simultaneously, with real-time updates and interaction.\n\n(See [Multiple concurrent connections](https://leo-editor.github.io/leo-editor/leoserver.html#multiple-concurrent-connections))\n\n### Auto Start\n\n**When auto-start is set, a vscode window will start a new instance of Leo server for itself on the next available network port.**\nIf the connection limit is set to anything above the default of one (1),\nthen the auto-start logic will consider a port being in use as\nbeing already started and will not start another one.\n_(Letting you connect, or auto-connect to it from any additional opened vscode window.)_\n\nThe server, located in your Leo-Editor installation folder, also has other options unrelated to\nLeoInteg that allows you to create a stand-alone internet server for other uses such as\nmulti-user interaction over a network/internet, and more.\n\nRun the server directly with the '--help' argument to view all server options and capabilities:\\\n`.../leo-editor/leo/core/leoserver.py --help`\n\nFor more information about the Leo server see [Using leoserver.py](https://leo-editor.github.io/leo-editor/leoserver.html) from Leo's official documentation.\n\n## Navigating a Leo Document\n\nArrow keys, home/end, page up/down are used for basic navigation. But in order to **find and goto specific nodes directly**, use the methods described below.\n\n### Goto Anywhere Command\n\nNormally in vscode, the the **`Ctrl+P`** shortcut allows you to switch to any project file, but when the focus is in one of Leo's panels, the **`Ctrl+P`** keybinding allows you to switch to a node directly by typing (part of) it's headline.\n\n![Goto Anywhere](https://raw.githubusercontent.com/boltex/leointeg/master/resources/goto-anywhere.gif)\n\n## Find Panel\n\nWith the focus in Leo's outline or body pane, Hit **`Ctrl+F`** to open the Find tab of the _find panel_.\n\n![Find Panel](https://raw.githubusercontent.com/boltex/leointeg/master/resources/new-find-panel.png)\n\nEnter your search pattern directly in the **\\\u003cfind pattern here\\\u003e** field. Press **`Enter`** to find the first match starting from your current position.\n\nHitting **`F3`** repeatedly will find the subsequent matches. (**`F2`** for previous matches)\n\nUsing the Nav tab of the _find panel_, (**`Ctrl+Shift+F`** to accesss directly) you can type your search pattern in the **Nav** field instead to see all results appear below. This will show the headlines as you type.\n\n![Find Panel](https://raw.githubusercontent.com/boltex/leointeg/master/resources/new-nav-panel-2.png)\n\nPress **`Enter`** to freeze the results and show results also found in **body text of any node**. This will add a snowflake icon ❄️ to the **Nav** field.\n\n![Find Panel](https://raw.githubusercontent.com/boltex/leointeg/master/resources/new-nav-panel-3.png)\n\nIf you check the **Tag** option, the **Nav** field is then used to find nodes by their tag 🏷 _ua_ (user attribute).\n\n## Undo Panel\n\n\u003e In LeoInteg, the undo functionality is a multi-tiered system that segregates structural outline changes from text changes within the body pane. The Undo Panel captures outline alterations as individual 'Undo Beads', independent from VS Code's native text undo states. When focus resides in the body pane, the Undo keybinding triggers VS Code's text-specific undo action. However, once the focus shifts, or a new node is selected, all concurrent text changes coalesce into a single 'Undo Bead' within the Undo Panel. These 'Undo Beads' can then be manipulated either through the Undo Panel or by keybindings, provided the focus is explicitly set on the outline pane. This dual-layer undo architecture enables precise control over both code and structural modifications.\n\nUse the undo / redo icons above the outline or above the undo pane itself. You can also right-click on an undo step to directly switch to that specific state!\n\n![Undo pane](https://raw.githubusercontent.com/boltex/leointeg/master/resources/undo-pane.gif)\n\n## Issues\n\nCommon issues are listed below. See the repository's [Issues Page](https://github.com/boltex/leointeg/issues) to submit issues.\n\n### Linux Keybindings\n\nIf you're experiencing trouble with the keyboard shortcuts for\nthe 'Clone Node' or the 'Promote' and 'Demote' commands,\nset **\"keyboard.dispatch\": \"keyCode\"** in your vscode settings and restart vscode.\nSee [Troubleshoot Linux Keybindings](https://github.com/microsoft/vscode/wiki/Keybinding-Issues#troubleshoot-linux-keybindings)\nfor more information.\n\n### Keybindings Conflicts Resolution\n\nIf you have a keybinding conflict for a command that you would like **not** to be resolved by Leo when the focus is on the body pane,\nadd **`\u0026\u0026 resourceScheme != 'leointeg'`** to the keybinding's \"_when_\" condition. (Use **`Ctrl+K Ctrl+S`** in vscode to open the Keyboards Shortcuts panel)\n\n### Move Outline Keyboard Commands\n\nFor some users, the **`Alt+[Arrow Keys]`**, **`Ctrl+D`** and **`Ctrl+T`** keybinding are already assigned.\n\nTo help with this conflict, tree-browsing, outline-move keyboard commands, and switch focus command will only trigger\nwith the additional condition of having no text selection in the editor.\n\nSo select at least one character to use the previously assigned original keyboard commands, while focus is in the body pane.\n\n\u003e Refer to the [issue tracker](https://github.com/boltex/leointeg/issues) page to learn more about the known issues, or to contribute with additional information if you encounter some yourself.\n\n## How It Works\n\nLeo integration into VS Code is done by starting\na [python server script](https://github.com/leo-editor/leo-editor/blob/devel/leo/core/leoserver.py) and connecting to it via\na [websocket](https://websockets.readthedocs.io/en/stable/intro.html)\nto exchange JSON data. The server script leverages [leoBridge](https://leo-editor.github.io/leo-editor/leoBridge.html)\nand re-uses code from the [leoflexx.py plugin](https://github.com/leo-editor/leo-editor/blob/devel/leo/plugins/leoflexx.py#L893).\n\nThe outline pane is made by implementing a\n[TreeDataProvider for vscode's TreeView API](https://code.visualstudio.com/api/extension-guides/tree-view#tree-view-api-basics),\nwhile the body-pane's _virtual document_ is made by [implementing a filesystem provider](https://code.visualstudio.com/api/extension-guides/virtual-documents#file-system-api)\nand using the outline's selected node 'gnx' as identifier.\n\n---\n\n## Acknowledgments\n\n### _Thanks to_\n\n- [Edward K. Ream](https://github.com/edreamleo) creator of the [Leo Editor](https://leo-editor.github.io/leo-editor/)\n- [Eric Amodio](https://github.com/eamodio) for the [welcome screen templates](https://github.com/eamodio/vscode-gitlens/tree/master/src/webviews)\n- [Vitalije Milošević](https://github.com/vitalije) for his contributions and support\n- [Arjan Mossel](https://github.com/ar-jan) for his suggestions and ideas\n- [Thomas Passin](https://github.com/tbpassin) for his contributions and support\n- [Viktor](https://github.com/ranvik14) for his contributions and support\n- [Gaurami](https://github.com/ATikhonov2) for his suggestions, bug reports and support\n- [Kevin Henderson](https://github.com/kghenderson) for his suggestions and support\n- [Ville M. Vainio](https://github.com/vivainio) for his Nav tab original concept\n- [Jacob M. Peck](https://github.com/gatesphere) for his Tags tab original concept\n- [Matt Wilkie](https://github.com/maphew) for his contributions and support\n\n---\n\n## 🤍 To sponsor, donate or contribute see my [user page 🦁](https://boltex.github.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboltex%2Fleointeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboltex%2Fleointeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboltex%2Fleointeg/lists"}