Commit Graph

6 Commits (main)

Author SHA1 Message Date
Gammut 607b426e26
Refactor queries for ecma based languages (#7207) 11 months ago
Jacob Chandler 90468ad6c5
fix: Improve JSX and TSX tag highlighting (#3973) 2 years ago
Benjamin Streit 714db9c666
fix: Improving JSX and TSX indents (#3853) 2 years ago
Michael Davis 08b442f4cc
Inherit javascript/typescript from common 'ecma' queries (#3301)
JavaScript queries now contain a few lines that prevent them from
being used whole-sale in typescript with `; inherits: javascript`.
Here we follow nvim-treesitter's way of using a fake 'ecma' language
as a common base for JavaScript and TypeScript to share as much as
we can.
2 years ago
Erasin 681c0a91dc
Add textobject for javascript (#3213) 2 years ago
Michael Davis ffdc2f1793
separate JSX queries from javascript (#1921)
It looks like a24fb17b2a (and
855e438f55) broke the typescript
highlights because typescript

    ; inherits: javascript

but it doesn't have those named nodes in its grammar.

So instead we can separate out JSX into its own language and copy
over everything from javascript and supplement it with the new
JSX highlights. Luckily there isn't too much duplication, just the
language configuration parts - we can re-use the parser with the
languages.toml `grammar` key and most of the queries with `inherits`.
2 years ago