Add syntax highlighting for meson build system by asakovets · Pull Request #3236 · micro-editor/micro (original) (raw)

but a bit less noisy (e.g numbers are not colored)

I think it's fine to highlight numbers and symbols, since users chould choose a colorscheme like simple where highlighting on some elements is minimal or none.

I'm inexperienced with syntax files but based on examples and the link in the file, maybe this could be added:

- constant.number: "\\b(0|[1-9][0-9]*|0b[01]+|0o[0-7]+|0x[0-9a-fA-F]+)\\b"
- symbol: ','
- symbol.operator: "[-+*/%?.:=!+<>]"
- symbol.brackets: "[(){}]|\\[|\\]"

@Andriamanitra
Sorry to ping, but may I request you to review this? I've seen some open source desktop software using Meson, so I think this would be nice to add. Actual examples I know other than documentation include util-linux, seatd, Xorg server and wlroots.