aboutsummaryrefslogtreecommitdiffstats
path: root/queries/javascript
Commit message (Collapse)AuthorAgeFilesLines
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-211-9/+7
|
* feat(format): extra newline after modelinePhạm Huy Hoàng2024-02-292-0/+2
|
* chore: format queriesPhạm Huy Hoàng2024-01-211-2/+2
|
* chore: query formattingPham Huy Hoang2024-01-192-23/+30
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sharing highlight queries with upstream tree-sitter and Helix is difficult. Solution: Where reasonable, use capture names in tree-sitter's standard list or Helix's Atom-style hierarchy. Specifically: * tree-sitter "standard capture names" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72): - `@parameter` -> `@variable.parameter` - `@field` -> `@variable.member` - `@namespace` -> `@module` - `@float` -> `@number.float` - `@symbol` -> `@string.special.symbol` - `@string.regex` -> `@string.regexp` - `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below) - `@text.title` -> `@markup.heading` - `@text.literal` -> `@markup.raw` - `@text.reference` -> `@markup.link` - `@text.uri` -> `@markup.link.url` (in markup links) - `@string.special` -> `@markup.link.label` (non-url links) - `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`) * Helix captures (https://docs.helix-editor.com/master/themes.html#syntax-highlighting): - `@method` -> `@function.method` - `@method.call` -> `@function.method.call` - `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}` - `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}` - `@text.uri` -> `@string.special.url` (outside markup) - `@preproc` -> `@keyword.directive` - `@define` -> `@keyword.directive`(`.define`?) - `@storageclass` -> `@keyword.storage` - `@conditional` -> `@keyword.conditional` - `@debug` -> `@keyword.debug` - `@exception` -> `@keyword.exception` - `@include` -> `@keyword.import` - `@repeat` -> `@keyword.repeat` * cleanup - remove some redundant `@conceal` (but still allow it for conceal-only patterns) - remove obsolete `@error` (syntax linting is out of scope for this repo) - sort, cleanup capture list in `CONTRIBUTING.md`
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-11/+11
|
* feat(javascript): highlight parameter destructuring patternsAnanda Umamil2023-07-011-0/+19
|
* Expand locals to include properties and methodsWilliam Mathewson2022-11-251-0/+30
| | | | | | | The previous locals were lacking a few locals related to JS classes. This expands the locals to include properties defined on classes (e.g. `this.foo = "bar"` or `static #targets`) as both vars & references, as well as private methods on classes (e.g. `#bar(x) { x }` and `#bar(y)`).
* highlights(javascript): "?." -> optional_chainGitHub2022-08-201-0/+3
|
* locals(js,ts): Add parameters again (#1231)Stephan Seitz2021-04-281-0/+32
|
* Add JS/TS parameters again (#1227)Stephan Seitz2021-04-231-0/+32
| | | | | * highlights(js): add parameters * highlights(ts): add Typescript parameters
* chore: create ecma base for use in js and ts which fixes jsx issueskiyan2021-03-105-407/+5
|
* feat: use @ignore for comments and multiline stringselianiva2021-03-011-0/+5
|
* Support the glimmer parser when the `hbs` template literal tag is usedNullVoxPopuli2021-03-011-0/+6
|
* feat(javascript): add template string language injectionSteven Sojka2021-02-111-3/+9
|
* feat(javascript): move shorthand prop to propertySteven Sojka2021-01-261-5/+3
|
* fix: js indent for object inside argumentselianiva2021-01-201-0/+1
|
* feat: added more indent querieselianiva2021-01-141-0/+26
|
* feat(js): add regex injections (#834)Steven Sojka2021-01-071-0/+2
|
* Remove usages of `@embedded` in highlightsStephan Seitz2021-01-061-1/+1
|
* Add lacked Javascript operatorsdelphinus2020-12-211-0/+16
|
* Javascript unary expression (#712)Dave Lage2020-12-121-0/+1
| | | | | | | | | * javascript: Move unary_expression matching. * javascript: Move unary_expression matching. * javascript: Update unary to operator * javascript: Update qnary to be more specific
* graphql: add injection to javascript and add comment queryLuis Carlos Cruz Carballo2020-11-291-0/+5
|
* javascript: Mark shorthand_property_identifier as variablerockerBOO2020-11-271-0/+1
|
* javascript: Add operator to / for division (#689)Dave Lage2020-11-251-0/+1
|
* fix(injections): update to new APIThomas Vigouroux2020-11-231-2/+1
|
* javascript: : in pairs as punctuation.delimiter (#684)Dave Lage2020-11-231-0/+2
| | | | | | | | | * javascript: : in pairs as punctuation.delimiter * javascript: Change pair : to operator * javascript: Set pair : as punctuation.delimiter * javacscript: Move pair : to punctuation
* typescript: Add optional_parameter ?rockerBOO2020-11-221-0/+1
|
* Javascript highlights: "..." -> punctuation.specialStephan Seitz2020-11-091-0/+1
|
* JS highlights: highlight optional parametersStephan Seitz2020-11-091-0/+5
|
* feat(js): add jsdoc lang injectionSteven Sojka2020-10-271-0/+2
|
* Merge pull request #585 from fffed/patch-1Steven Sojka2020-10-271-0/+21
|\ | | | | js: add query for @parameter
| * update comment case for simplefied notationfffed2020-10-271-1/+1
| |
| * add destructuring variationsfffed2020-10-271-0/+17
| |
| * remove destructuring from @parameterfffed2020-10-161-4/+0
| |
| * Add additional queries for @parameter for jsfffed2020-10-151-0/+8
| |
* | fix(javascript): fix constant variable highlightJoosep Alviste2020-10-231-3/+3
| | | | | | | | | | | | The `@constant` query gets overwritten by the `@constructor` query. They both query for variables starting with an uppercase letter, but the `@constant` query took effect first.
* | feat(folds): add catch_clause to js foldsSam Bernheim2020-10-161-0/+1
| |
* | feat: add more javascript foldssbernehim42020-10-161-0/+3
|/
* feat(queries): modeline mechanism for base langsThomas Vigouroux2020-10-113-0/+4
| | | | | | | | This implements https://github.com/neovim/neovim/pull/13059#issuecomment-704414189 This behaves like modelines and remove the use of the base_language map. Also, this allows to fine-tune what we actually want to include per query, which is better IMO.
* fix(highlights): Add TSNamespace highlightStephan Seitz2020-10-101-0/+5
| | | | | | | | | Start adding highlights for - C++ - Rust (including other scoped_identifier/scoped_type_identifier fixes) - JS (only namespace_import) Addresses #516
* Remove textobjects moduleStephan Seitz2020-10-041-36/+0
|
* Add @keyword.operator for operators that are English words and add ↵Stephan Seitz2020-09-191-6/+12
| | | | @exception for Java/JS
* Fix #307: Use and document TSVariable/TSVariableBuiltin in all languagesStephan Seitz2020-09-141-0/+4
|
* Folds: rename query files to folds.scm to be consistentSantos Gallegos2020-09-141-0/+0
| | | | We use plural names for all query files except folds.
* fix(highlights): add missing js operatorsSteven Sojka2020-09-101-17/+30
|
* fix using highlight query extension for every query typekyazdani422020-09-071-12/+0
|
* feat(folds): add ts and js foldsSteven Sojka2020-09-061-0/+15
|
* fix(locals): js add arrow function parameter as definitionSteven Sojka2020-09-021-0/+4
|
* fix(locals): add js namespace import as definitionSteven Sojka2020-08-261-0/+3
|