Structured Editing and Incremental Parsing

(tratt.net)

38 points | by ltratt 7 hours ago ago

5 comments

  • bgoated01 an hour ago

    I'm not extremely familiar with the details of incremental parsing, but I have used Cursorless, a VSCode extension based on tree-sitter for voice controlled structured editing, and it is pretty powerful. You can use the structured editing when you want and also normal editing in between. Occasionally the parser will get things wrong and only change/take/select part of a function or what have you, but in general it's very useful, and I tend to miss it now that I am no longer voice coding much. I seem to remember that there was a similar extension for emacs (sans voice control). treemacs, or something? Anyone used that?

    [0] https://www.cursorless.org/

  • sudahtigabulan an hour ago

    > it is now clear to me that there is ongoing work on structured editing which either doesn’t know about incremental parsing in general, or Tim’s algorithms specifically. I hope this post serves as a useful advert to such folk

    I'm curious about this unnamed ongoing work (that is unaware of incremental parsing).

    Anyone know what he is referring to?

  • shakna 3 hours ago

    Trying to use any kind of syntax highlighter with TeX is a pain in the butt. I didn't mean LaTeX there. I mean TeX, which can rewrite it's own lexer, and a lot of libraries work by doing so. I move in and out of TeXInfo syntax and it basically just causes most editors to sit there screaming that everything is broken.

  • practal 4 hours ago

    I think simpler is better when it comes to structured editing. Recursive teXt has the advantage that it proposes a simple block structure built into the text itself [1]. Of course, you will need to design your language to take advantage of this block structure.

    [1] http://recursivetext.com

    • computably an hour ago

      Since Lisp has been around since 1960... Congratulations, you're only about 64 years late.