summaryrefslogtreecommitdiff
path: root/queries/ecma
AgeCommit message (Collapse)Author
2022-10-24Update ecma injections to support recent additions to ↵NullVoxPopuli
tree-sitter-javascript/typescript
2022-10-17highlights(ecma): add pair_pattern punctuation.delimiterMunif Tanjim
2022-10-15highlights: use @preproc where appropriateObserverOfTime
2022-09-26feat(spell): support more languagesLewis Russell
2022-09-15fix(ecma injections): jsdoc match /** */ onlyNick Friday
2022-09-11highlights(ecma): use `@method.call`/`function.call`Stephan Seitz
2022-09-10indents(ecma): make "]" `@indent_end`Stephan Seitz
Fixes #3382
2022-08-22highlights(ecma): Update queries for literalsSergio Alejandro Vargas
- Add queries for value properties: - undefined - NaN - Infinity - Highlight regex delimiters as brackets instead of punctuation - Format queries for literals
2022-08-20highlights(javascript): "?." -> optional_chainGitHub
2022-07-07fix(ecma): indent end for bracket (#3121)Kiyan
2022-06-05injections(ecma): add injection for commented graphql template strings (#2987)Jackson Ludwig
2022-05-14Use @definition.function for method & func definitionsWilliam Mathewson
2022-05-14Add method to definitions in ECMA localsWilliam Mathewson
In Telescope, function declarations were being exposed in the selector, but not method definitions which are also a form of function declaration.
2022-04-04indents(ecma): use auto indent on (ERROR)Stephan Seitz
Fixes #2515
2022-02-26fix(indent): ecma - parenthesized expression indentationMunif Tanjim
2022-02-26fix(indent): ecma - class method indentationMunif Tanjim
2022-01-21feat(indent): ecma - support common use-casesMunif Tanjim
2022-01-21feat(indent): ecma - support try_catch and if_elseMunif Tanjim
2021-12-12highlights(ecma): highlight escape_sequenceStephan Seitz
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-11-25ecma: highlight private properties and methodsnumToStr
2021-11-23Prefer lua-match over matchLewis Russell
as string.find is much quicker than vim.regex:match*
2021-10-03fix: remove priority in ecma template substitution hlkiyan
This PR removes the priority override for the interpolation because it overrides every ecma based template literal, setting none with a higher priority than ecma groups which made every template string look `un`highlighted.
2021-09-17Ecma: increase priority of template_substitutionSantos Gallegos
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/1688
2021-09-09Use the color of variabledelphinus
2021-09-09Set property color for destructuring assignmentdelphinus
2021-08-12Enable to highlight shebang on JS/TSdelphinus
2021-07-07place template string after bracesantonk52
2021-07-06fix(ecma): add indents to switch and casesSamyak S Sarnayak
fixes nvim-treesitter#1384
2021-07-04feat(keywords) merge return and yield into keyword.return groupantonk52
2021-07-04feat(keywords) add keyword.return & keyword.yieldantonk52
2021-06-11chore(injections): remove duplicated regex injection for jsSteven Sojka
2021-05-17highlights(ecma): use KeywordFunction as a highlight group for functionantonk52
2021-05-07Revert "Comment: use `@combined` to create just one tree per buffer (#1252)"Santos Gallegos
This reverts commit 4a7a713c527f57c355bc817f16fc6d955b8cce9b.
2021-04-28locals(js,ts): Add parameters again (#1231)Stephan Seitz
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-23Add JS/TS parameters again (#1227)Stephan Seitz
* highlights(js): add parameters * highlights(ts): add Typescript parameters
2021-04-22fix(highlights): always highlight ternary operator as operatorThomas Vigouroux
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-23Add generator functions to ecma querieskraftwerk28
2021-03-18Update injections.scmHanh Le
2021-03-16Mark several invalid queriesStephan Seitz
2021-03-15Ecma: Highlight single-argument callback parameterRohit Pradhan
2021-03-10chore: create ecma base for use in js and ts which fixes jsx issueskiyan