latex-lsp / tree-sitter-latex

LaTeX grammar for tree-sitter
MIT License
87 stars 21 forks source link

Add support for numbers #136

Open jdujava opened 3 weeks ago

jdujava commented 3 weeks ago

I am not really sure if this is even desirable (slightly different highlighting for number could be nice). If not, I don't mind dropping this.

clason commented 3 weeks ago

I don't think it makes sense to highlight numbers differently globally -- in LaTeX (or any text markup language), numbers are just part of a text. It would be different if you only added support for this as part of the (La)TeX language: as arguments of commands or environments where, e.g., a length or count is required.

jdujava commented 3 weeks ago

Right, I agree. Will think about how (and if) to implement this only in command/environment arguments.