This video contains multiple topics that I found interesting:
- 00:00 - 06:36: problem, constraints and solution
- 06:36 - 08:30: lexer
- 08:30 - 11:55: lexer “snapshot” or “golden” testing leveraging
cargo test and
cargo insta review
- 11:55 - 14:45: parser
- 14:45 - 16:15: testing the generated code
- 16:15 - 19:20: what the generated code looks like, how it integrates with neovim’s vimscript runtime
This is a neat project but the presentation style is really grating. It’s like ChatGPT’s over-stylized, over-confident style acted out. It is making me wonder if ChatGPT was actually just trained on YouTube videos with surprised face thumbnails :)
On substance, they seem to be saying two contradictory things:
Since the premise of the tool is manually maintaining lua translations of the vim9script runtime files would be too burdensome, the second point really undercuts the first point. Anyone who wants to improve the runtime files will have to use both upstream vim9script and this tool. That is probably fine in the end but the sales pitch makes me feel like I’m on a used car lot.
That aside, this could be a good base onto which a vim9script linter could be built. The vim implementation of vim9script works quite well but the internals are very direct. There’s no formal AST maintained. That makes it difficult to reuse that code for complementary tools like linters.
I think this is meant to reassure those who would be negatively impacted by the addition of Rust to neovim (build times, dependency chain complexity…).