vectordotdev / vrl

Vector Remap Language
Mozilla Public License 2.0
127 stars 57 forks source link

Tree Sitter parser and nvim-treesitter support #964

Open belltoy opened 1 month ago

belltoy commented 1 month ago

I'm using and following vector for years. There is a missing part since the VRL was introduced till now, the syntax support in editors. I found some people were trying to build tree-sitter parse few years ago but not finished at the end.

Earlier, I've written a simple vim plugin via the original vim syntax match to highlight VRL codes. But that's not good enough for the modern develop environment.

Recently, I wrote a VRL parser and integrated it into neovim.

Finally, we have a better syntax highlighting and something more provided by the power of tree-sitter, such as code folding, auto indentation, variable references, and code injections in YAML/TOML files. Other editor than neovim could be easily adding VRL support via tree-sitter support.

Hope that helps.

jszwedko commented 1 month ago

Very cool, thanks for sharing @belltoy