A tree sitter grammar that's trying to be general enough to work through most log files. Mainly inspired by the VSCode extension and this repo. For now it's integrated into Helix Editor, but can be used everywhere you use tree-sitter.
If something is not highlighted as you want, feel free to submit a PR or open an issue.
The most important files are grammar.js and test/corpus/testsuite.log, almost all the rest is generated by the tree-sitter
command line tool.
You need to install the requirements for tree-sitter, you can follow the official doc.
tree-sitter generate
tree-sitter generate && tree-sitter test
You will need to configure a theme for this, see this link. An example that defines the theme for the queries can be found in the file config.json.
tree-sitter generate && tree-sitter highlight <FILE_PATH>.log
- add url parsing
- known_failures.log tests