latex-lsp / tree-sitter-latex

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

Parsing of align delimiters #125

Open jdujava opened 1 month ago

jdujava commented 1 month ago

As of now, queries find align delimiters (&) by matching content of word nodes to string "&" (see nvim-treesitter implementation).

This is not very robust, as can be seen in https://github.com/nvim-treesitter/nvim-treesitter/issues/6697. This particular "bug" can be easily fixed (see https://github.com/nvim-treesitter/nvim-treesitter/issues/6697), but as pointed out in https://github.com/nvim-treesitter/nvim-treesitter/pull/6698#issuecomment-2135710508, it would be cleaner and more efficient to solve this on the level of the parser, which could parse align-style environments/equations.

What are your thoughts on this?