tree-sitter playground reddit / emacs ---------------------------------------------------------------------- JDRiverRun · 2022-12-24 17:24 * [tree-sitter playground](https://tree-sitter.github.io/tree- sitter/playground) For people wondering what the parsing capabilities of tree-sitter will be, or maybe hacking on or planning for some emacs modes to make use of it, I found the very helpful [tree-sitter playground](https://tree- sitter.github.io/tree-sitter/playground). Pick your language, enter some test code, click around. It's really impressive. ---------------------------------------------------------------------- darkawower · 2022-12-24 21:17 Awesome, it would be nice to have such feature inside emacs, like neovim has [https://github.com/nvim- treesitter/playground](https://github.com/nvim-treesitter/playground) (right now we have tree-sitter-debug-mode, but without interactivity) ---------------------------------------------------------------------- machineperson · 2022-12-24 23:19 Pity that LISP is missing. ---------------------------------------------------------------------- agumonkey · 2022-12-25 00:24 Maybe I'm querying wrong, but there's no change when I write one. ---------------------------------------------------------------------- AwkwardAd4115 · 2022-12-25 02:15 Lisp might be the only language that doesn't need a parser. ---------------------------------------------------------------------- IcarianComplex · 2022-12-25 02:16 I hope imenu gets a lot better thanks to this. I feel like it never shows exactly what I want except for org mode. ---------------------------------------------------------------------- JDRiverRun · 2022-12-25 02:33 I was just investigating all the regex and PPSS hackery required to not-really-nail the identification of things like `x.a['key']` in python. Pages and pages of code. ---------------------------------------------------------------------- tmting · 2022-12-25 02:59 I'm not a programmer but would like to understand this. Can you ELI5 to me? ---------------------------------------------------------------------- AwkwardAd4115 · 2022-12-25 04:06 Parsers convert programming language to "abstract syntax trees" (a hierarchical relationship between the "tokens" that compose a program). In Lisp, this syntax tree is inherent in the syntax (a lisp program is composed of S-expressions, which are inherently tree-like). ---------------------------------------------------------------------- machineperson · 2022-12-25 10:22 You mean to say there are no uses for tree-sitter in Lisp? That's absolutely not true. ---------------------------------------------------------------------- [deleted] · 2022-12-25 11:02 [removed]