Re: vs code chronicles: code folding and Leo's importers

2020-08-15 Thread jkn
I re-read that link as well; something that amused me is that to this day, when writing out emails or other screeds of text, I tend to delimit 'blocks', for my own benefit, with '{{{' and '}}}' blah blah blah, here I am, chatting about some code, say the program looks like this: {{{ int

Re: vs code chronicles: code folding and Leo's importers

2020-08-14 Thread Peter GAAL
There is no trace of "folders" anywhere in my only surviving "Programming in occam 2" manual (by Geraint Jones and Michael Goldsmith from 1988), so the folding concept must have been definitively a feature of the original Transputer Development System (TDS) of INMOS. As it was an /integrated/

Re: vs code chronicles: code folding and Leo's importers

2020-08-13 Thread jkn
My comments here have probably been overtaken by other postings. But yes, IIRC the folding marks just appeared in the resulting output occam file as sentinel-like marks. Origami had the advantage that it was only really used for occam, so you could be sure about what marks to use. I can't reme

Re: vs code chronicles: code folding and Leo's importers

2020-08-13 Thread k-hen
Not sure if it's relevant, but it might be worth looking at Tree-Sitter which I've always found interesting. It was being developed for Atom prior to the Microsoft GitHub acquisition. More recently, CodeMirror (an alternative to Monaco) has followed suite and implemented something similar, call

Re: vs code chronicles: code folding and Leo's importers

2020-08-13 Thread Edward K. Ream
On Thu, Aug 13, 2020 at 7:33 AM Thomas Passin wrote: > Here's someone who re-implemented Origami. Here he talks a bit about how > folding was implemented (double-linked n-trees) - > > http://wotug.org/parallel/tools/editors/folding-editors/fe-mh/README.html > Thanks for this. Imo, emacs org mod

Re: vs code chronicles: code folding and Leo's importers

2020-08-13 Thread Thomas Passin
Here's someone who re-implemented Origami. Here he talks a bit about how folding was implemented (double-linked n-trees) - http://wotug.org/parallel/tools/editors/folding-editors/fe-mh/README.html If you go to the parent directory, you can get the entire source (in C, apparently from 1997). O

Re: vs code chronicles: code folding and Leo's importers

2020-08-13 Thread Edward K. Ream
On Wed, Aug 12, 2020 at 4:43 PM jkn wrote: I can't remember if I've mentioned Origami, the old Transputer Development > System's (DOS-based) editor. It had a wonderful implementation and key > binding for code folding. > A little googling took me here

Re: vs code chronicles: code folding and Leo's importers

2020-08-12 Thread jkn
I've used other editors with simple configurable folding modes, including this 'use the level of indentation' one. Like you, I find it disappointingly limited, & never really used it in anger. I can't remember if I've mentioned Origami, the old Transputer Development System's (DOS-based) edito

Re: vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Edward K. Ream
On Tuesday, August 11, 2020 at 5:28:44 PM UTC-5 Edward K. Ream wrote: > The code is a labyrinth...It's time for a break. I googled "vs code folding" and found this manual page , containing this quote: QQQ Folding regions are by def

Re: vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Edward K. Ream
On Tue, Aug 11, 2020 at 5:01 PM Edward K. Ream wrote: > I don't see any way to use [the ts code] in Leo, but I'll look a bit further... Searching for foldingProvider yields: src\vs\workbench\api\common\extHostLanguageFeatures.ts There are related providers in various languages, which lead to th

Re: vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Edward K. Ream
On Tuesday, August 11, 2020 at 11:51:17 AM UTC-5 Edward K. Ream wrote: Hah! I forgot vs code's global search command. Searching for "fold" gives > too many hits on "folders", but searching for "folding" yields promising > results. And that's even before using a word-only or a regex search. > It

Re: vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Edward K. Ream
On Tue, Aug 11, 2020 at 12:27 PM Thomas Passin wrote: > The editor component is a Microsoft project called Monaco - > > https://github.com/microsoft/monaco-editor > > Monaco itself can do code folding. Maybe it would be easier to find the > code in its code base than in vscode's. > Thanks for t

Re: vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Thomas Passin
The editor component is a Microsoft project called Monaco - https://github.com/microsoft/monaco-editor Monaco itself can do code folding. Maybe it would be easier to find the code in its code base than in vscode's. On Tuesday, August 11, 2020 at 12:45:42 PM UTC-4, Edward K. Ream wrote: > > Yes

Re: vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Edward K. Ream
On Tuesday, August 11, 2020 at 11:45:42 AM UTC-5, Edward K. Ream wrote: > Does anyone know how (and where) vs code calculates these fold regions? Hah! I forgot vs code's global search command. Searching for "fold" gives too many hits on "folders", but searching for "folding" yields promising re

vs code chronicles: code folding and Leo's importers

2020-08-11 Thread Edward K. Ream
Yesterday I tried to import come complex c++ code into Leo. Leo's c++ importer didn't do well with templates. A lot of hand tweaking was necessary. This work did create a head-slapping moment: the hard part of Leo's importers is determining the lines on which classes, methods and functions beg