summaryrefslogtreecommitdiff
path: root/queries/ecma/injections.scm
AgeCommit message (Collapse)Author
2022-10-24Update ecma injections to support recent additions to ↵NullVoxPopuli
tree-sitter-javascript/typescript
2022-09-15fix(ecma injections): jsdoc match /** */ onlyNick Friday
2022-06-05injections(ecma): add injection for commented graphql template strings (#2987)Jackson Ludwig
2021-11-28Handle .attrs() casesSteve Occhipinti
Now that there are 4 cases handled, I thought it probably needs some comments to show which case each injection is for. There are other unsupported cases, such as `.withConfig` but I'm not sure if they all belong here or into their own plugin or something. The API reference is available here: https://styled-components.com/docs/api Also, not sure if there is a more generic way of handling all these cases at once, a rule that would read: "any template string descendant from 'styled'". Will attempt to open a PR and get some advice.
2021-11-28Support both styled.div and styled(Component)Steve Occhipinti
This new injection caters for code like this: ``` const IntroWindow = styled(Window)` grid-area: intro; ` ```
2021-11-28Add a basic styled-components injectionSteve Occhipinti
I've never written this sort of code before but I was able to get this to work with the help of copy and paste and using nvim-treesitter/playground. I had a hard time trying to understand how to indent this style of code so I let vim do it with `=` and 2 spaces seems to match other files I looked at. This works for a basic example, like this: ``` const Layout = styled.div` position: absolute; inset: 0; display: grid; grid-template-rows: 100px 1fr 3rem; ` ```
2021-06-11chore(injections): remove duplicated regex injection for jsSteven Sojka
2021-05-07Revert "Comment: use `@combined` to create just one tree per buffer (#1252)"Santos Gallegos
This reverts commit 4a7a713c527f57c355bc817f16fc6d955b8cce9b.
2021-04-28Comment: use `@combined` to create just one tree per buffer (#1252)Santos Gallegos
* Comment: use `@combined` to create just one tree per buffer There is no need to create a tree per line/block for comments. Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251 * Add injections for scss * Fix jsonc * Combine jsdoc
2021-04-06injections(js): add regex highlightingStephan Seitz
2021-03-27Fix jsdoc: play nice with the comment parser (#1108)Santos Gallegos
Using separate queries makes it work as expected. Also, for the comment parser to be able to override the other tokens we need to remove the comment from highlights (this shouldn't be a problem since that section is already highlighted as a comment). And, the order of the captures matter, having jsdoc first will have more priority over `@param`. Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/1069
2021-03-18Update injections.scmHanh Le
2021-03-10chore: create ecma base for use in js and ts which fixes jsx issueskiyan