Coder Social home page Coder Social logo

leointeg's People

Contributors

boltex avatar dependabot[bot] avatar edreamleo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leointeg's Issues

Could the body pane automatically follow the selected node in the outline (as in Leo)? And support for unified outline&bodies tree/pane?

An idea that has come up several times over the years on Leo's mailing list is the possibility to have a combined view of the outline and node bodies, with the body of each node rendered inline, and both headlines and node bodies being editable inside this unified tree.

A major advantage compared to the current situation is that this would make it possible to see the contents of the preceding and following nodes while working on a particular node's body. This would significantly reduce the need to keep track in your mind of what's what, and also allow you to scroll through a large document as with regular editors (while keeping Leo's advantages of organizing with nodes, clones, etc.).

Is this something that could be done in leointeg / VSCode?

Save and restore selection, along with cursor position when switching from node to node

Save and restore selection, along with cursor position, from selection state saved in each node (or gnx array)

Addendum: Once implemented, this can be tested by trying to run the 'execute script' command on a text selection via leo's minibuffer (alt+x) instead of (ctrl+b) or the command palette (ctrl+shift+p).

Can clise this issue after removing the internal ctrl+b execute script to use leo's own command directly like the rest of normal commands.

Have node selection reflect in body with arrow keys alone, instead of having to use the enter key

Suggested by @ar-jan as an unrelated idea to an other issue #32 : #32 (comment)

Could this be mimicked? ...In Leo, if arrow keys are used in the outline, the node selection is reflected instantly in the body pane. In vscode, an outline has a cursor

Q&A below:

Q: It's already the case when using the keyboard to expand/contract nodes so why not making it so too when moving the outline "cursor" ?
A: expanding and collapsing nodes have an associated event, although moving the cursor in the tree is detectable, the selection cursor is unkown as far as I know as opposed to a collapse/expand event.

Implement alt-x minibuffer command quick select/prompt

Should be easy, vscode has pre-made tui components for that sort of thing.

1-make a command in leobridge server to fetch list of commands to propose for a given string, (get_auto_complete)
2- open an auto complete prompt on alt-x feed it with the previous output from get_auto_complete, fetch get_auto_complete while staying open if the user adds to string.
3-Enter calls a 'run command by name' with the given string name as parameter to leobridge.

Watchout! command ran this way might summon null-GUI
calls and stuff!

Some commands do not support 'Undo'

This can be fixed by altering only leobridgeserver.py (from editing its leo file: leoInteg.leo)

UNDO operation works with outline changes such as move node commands, but some others (insert node, rename node and maybe others..) seem to need to set an 'undo' restore point when being executed.

See class Undoer in leoUndo.py from Leo's sources for relevant methods to be called for this fix.

Add color syntax from Leo to the body pane editor

Grab the color syntax that would be applied to leo's body pane and apply it to the document editor.

Nope! too much work because no gui is running and no color-syntaxing was applied in the first place when running in leoBridge!

Instead define the same syntax as Leo to be applied to "body panes"

Support opening leo files from explorer pane and offer 'recent files' along with auto opening

Try to add an entry in the regular explorer (right-click) files context menu if a file has extension ".leo"

(Idea given after reading Brad's comment on the google group forum about having more 'seamless' integration.)

Note: The user must have had set his leoInteg settings correctly to automatically "start server" and "connect to server" and optionally 'python command' launch string at minimum for any of the smooth integration to even make sense in the first place.

Add commands that use the 'marked' property of nodes

Commands that use the 'marked' property of nodes:

  • copy-marked Copies all marked nodes as children of a new node.
  • diff-marked-nodes
  • goto-next-marked
  • mark-changed-items
  • mark-subheads
  • unmark-all
  • clone-marked-nodes
  • delete-marked-nodes
  • move-marked-nodes

Slugish/extraneous outline refreshes when changing by selecting a different body pane, or when switching treeview

Outline seems to refresh (slight flash of side lines of expanded parent nodes), in a slugish manner twice, or even thrice, when coming back from an automatic change of outline-node selection caused by using a different body pane. (a body pane from a node of a different gnx).

It is also the case when refreshing the tree because of a change in active leo outline treeviews in vscode's workspace (switching between file explorer and standalone outline).

On the other hand, it seems to refresh perfectly when coming back from a node operation like move, insert and other outline edition commands! So it's probably the order and chaining of operations performed when trying to refresn in those instances, and/or the node parameter chosen as target of the 'reveal' function call(s).

  • Idea: Maybe the matching node in the gnxToLeonode array needs to be refreshed before being used as parameter of the reveal function...

Support multiple simultaneous opened leo files

Leo has tabs to offer choice between multiple opened Leo files, it would be useful to offer a way to have the same capability. (through someting other than tabs)

Maybe a menu openable through the status bar indicator or other items in the dropdown in the outline's titlebar.

Add clone-find commands

Commands that move clones of all nodes matching the search pattern under a single organizer node, created as the last top-level node:

  • cfa clone-find-all
  • cff clone-find-all-flattened (Flattened searches put all nodes as direct children of the organizer node)

'Clone-marked' commands that move clones of all marked nodes under an organizer node:

  • cfam clone-find-marked
  • cffm clone-find-flattened-marked

Show todo tasks unknown attributes under nodes in the outline

Pass p.v.u in archived positions, discard it on reception as to not have this weight in 'apJson' that is used on the way back when ap's are sent back as parameters in Leo commands.

i,e, when right clicking on a particular node to issue a command and not use the 'currently selected node'.

Status bar color and text should be a configuration settings

Status bar flag for leo keybinds should offer configurable text, color, placement etc.

On the dev branch, commit 6288f23 Makes the color (hex) and string customizable. Up to 8 character long.

Configuration for left/right placement would be nice.

Color chooser instead of a text input for the hex string color would be nice too!

Add command-buttons in more views and context menus, & add config options to choose which command to show/hide for each location

Offer command icons to perform leointeg's actions in more views and context menus (Currently only The View title menu - view/title and The View item menu - view/item/context are used so far):

Also offer settings to hide/show them individually.

Such as those three common ones ("when" clause : filesystem-scheme is 'leo' to limit to leo bodies):

  • The editor title menu bar - editor/title
  • The editor title context menu - editor/title/context
  • The editor context menu - editor/context

see https://code.visualstudio.com/api/references/contribution-points#contributes.menus for complete list of menus into which to place command-buttons/icons.

Problem starting the leo-bridge server automatically with anaconda/miniconda on windows

Hi, it looks like you've been making great and steady progress over the last several months. Awesome! I just tried out the dev branch and I'v run into a problem loading the extension. I've installed all dependencies etc as described. Actually the first time I ran F5 to run the extension a welcome screen with Leo icon did appear, but I'd already clicked a VSCode message about window loading taking longer than 10 seconds, and trying a reload. Now I don't see the Leo welcome anymore.

When I click the "Connect to Leo Bridge server" icon in the Leo tab, I get Leo Bridge Connection Failed.

The terminal in the original window says this:

Executing task: npm run webpack <

[email protected] webpack C:\Programs\leointeg
webpack --mode development

Starting type checking service...
Using 1 worker with 2048MB memory limit
Child
Hash: f72f38eb55e39ace8f04
Version: webpack 4.41.2
Time: 3915ms
Built at: 01/12/2020 16:35:25
Asset Size Chunks Chunk Names
extension.js 271 KiB main [emitted] main
extension.js.map 357 KiB main [emitted] [dev] main
Entrypoint main = extension.js extension.js.map
[./src/constants.ts] 1.12 KiB {main} [built]
[./src/eamodioEditorManager/activeEditorTracker.ts] 3.56 KiB {main} [built]
[./src/eamodioEditorManager/comparers.ts] 1.6 KiB {main} [built]
[./src/eamodioEditorManager/documentManager.ts] 10.3 KiB {main} [built]
[./src/extension.ts] 12.1 KiB {main} [built]
[./src/leoBody.ts] 9.48 KiB {main} [built]
[./src/leoBridge.ts] 5.09 KiB {main} [built]
[./src/leoFiles.ts] 2.13 KiB {main} [built]
[./src/leoIntegration.ts] 53.2 KiB {main} [built]
[./src/leoNode.ts] 2.26 KiB {main} [built]
[./src/leoOutline.ts] 2.24 KiB {main} [built]
[./src/serverService.ts] 3.2 KiB {main} [built]
[./src/webviews/leoSettingsWebview.ts] 4.18 KiB {main} [built]
[path] external "path" 42 bytes {main} [built]
[vscode] external "vscode" 42 bytes {main} [built]
+ 27 hidden modules

WARNING in ./node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in 'C:\Programs\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:\Programs\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: 3904ms
Built at: 01/12/2020 16:35:25
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.9 KiB settings [emitted] settings

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

And the debug console says:

(node:11832) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
warning.js:27
(node:11832) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
warning.js:27
Launch with default command : py -3 c:\Programs\leointeg/leobridgeserver.py
extension.js:7226
leoInteg startup launched in 6 ms
extension.js:5532
websocket error: connect ECONNREFUSED 127.0.0.1:32125
extension.js:5921
websocket closed, code: 1006
extension.js:5925
websocket error: connect ECONNREFUSED 127.0.0.1:32125
extension.js:5921
websocket closed, code: 1006

I do have websockets installed in my default Python environment (which is an Anaconda env, Python 3.7.3). Any way to check if leointeg is using the correct Python environment? Also npm install from within VSCode terminal says all packages are installed. echo %PYTHONPATH% gives C:\Programs\Leo (correct). I'm on Windows 10. Leo is at version 6.0-final.

Any ideas to debug this further?

Add more 'file' commands such as: 'new', 'close' and 'save as'

While having only one opened Leo file at a time, it would be nice to be able to start 'new' leo files, and / or save with a new name.

Also being able to 'close' and (re)open another Leo file would be desired.

This is different than supporting multiple opened Leo files.

Remove multiple bodies editing feature: focusing them can't "reveal" hidden nodes properly

It is not possible in vscode, to properly 'reveal' a node that is hidden (child of collapsed node are, by definition, not visible) when his siblings have the exact same headline label, or are clones.

The first one of the repeated headline label will be selected regardeless. This otherwise works fine if the node is already 'visible'. (This is because if it's visible it has been created as a specific node instance of the treeview. vscode seems then to be able to handle this because it can somehow be pointed to specifically when revealing)

So to counter this, change the behavior to mimic exactly Leo: Colapsing or expanging a node should also select it. So that it is impossible to have a selected node that is invisible (hidden inside its collapsed parent).

Most importantly, modify the 'open aside' feature, so that it selects the chosen node first, then opens it. So only ONE body pane is opened at a time, altough still "duplicatable" in many panels so that "split view" will still be possible. This change will remove the "more than one body opened at the same time".

This simplification will ultimately help a lot in the short and middle terms. It will also help with other problematic features such as closing opened bodies of 'expired gnxs' (e.g. after deletion of tree branches), 'hoist/dehoist' commands and many other.

Add hoist/dehoist commands

Add three commands to cover all cases:

  • Hoist node (via right-click/context menu)
  • Hoist current selection
  • Dehoist

Body pane filesystem : fix timing and transition to get rid of vscode errors in debug console when de-hoisting/changing documents.

(Does not seem to affect rendering / usage )

Providers for treeview, and provider for body pane filesystem should handle transitions from a document to the next, or hoisting/dehoisting without generating warnings/errors in vscode's debug console.

Try to cleanup last opened-gnx transition to a new one. Also try to cleanup the tree-refresh cycle after de-hoisting/changeing leo file.

Upgrade leoBridge server to accept multiple connections

Make leoBridge server 'persist' through disconnects and accept multiple connections from the same user/ip for multiple vscode windows instances.

This is not 'multi-user' or 'multi-edition', instead it multi-connection for the same user at the same 'editing point' so that if leoInteg is installed in vscode for a given machine, and it's started (connected to a leobridge server) all of vscode's windows will show the same tree, body simultaneously in a synchronised manner.

(Leobridges would just run in a single 'user' & single selected 'commander' as usual, but it gives a copy of its 'json answers' on all connected websockets at once.)

This implies new functionality, such as:

  • Close Leo file ( Overlaps #13 )
  • Disconnect
  • Kill Server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.