linercreation.blogg.se

Lighttable code folding
Lighttable code folding





lighttable code folding

An AST-query language, so you can do arbitrary searches without having to code them up and restart the editor. a documentation-like view that lists a struct at the top, and functions taking a pointer to that struct after that, with only the functions folded by default. You can dream up lots of use cases here, e.g.

  • Why not just combine those two with the actual code view? Just use code folding to make search results easier to skim.Īt this point, we have a powerful navigation feature, that is similar to what we see in Eve, where we're only viewing the code we care about at the moment.
  • As an implementation detail, you can probably reuse a lot of code between the project explorer and the search results.
  • Since we have an AST in memory, we can perform intelligent searches, like 'list all functions that call this function', or 'all functions that take this type as an argument'.
  • You rarely ever need to view that and the code at the same time, but something like that should be accessible quickly, as a means of navigation.

    lighttable code folding

    Many IDEs have a window showing all files, and, hierarchically, all top-level code elements inside them.When opening file_name:function, we don't really need to show the entirety of the file, just visualize that one function node.Since we're working with ASTs, we don't need to address code snippets by file_name:line_number anymore.

    #LIGHTTABLE CODE FOLDING HOW TO#

    I promise it's going to make some sort of sense by the end.Įssentially, I came up with a feature I didn't know I wanted until thinking about how to implement something like Stride for Go (that's a whole other can of worms I am not going to touch on today). That's a lot of time to spend thinking, so let me first apologize for the incoming wall of text. Thanks to the reddit hype around direct AST editing these past couple weeks, I've been thinking.







    Lighttable code folding