| Age | Commit message (Collapse) | Author |
|
tree-sitter-javascript/typescript
|
|
|
|
|
|
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.
|
|
This new injection caters for code like this:
```
const IntroWindow = styled(Window)`
grid-area: intro;
`
```
|
|
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;
`
```
|
|
|
|
This reverts commit 4a7a713c527f57c355bc817f16fc6d955b8cce9b.
|
|
* 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
|
|
|
|
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
|
|
|
|
|