tree-sitter is a popular backend facility for certain code editors (e.g. Neovim) to provide syntax highlighting and other language-specific features.
It would be nice if there were an official grammar for Logstash. There are some attempts by various individuals, but it's unclear what the quality or support level for these would be.