aboutsummaryrefslogtreecommitdiffstats
path: root/queries/javascript/highlights.scm
Commit message (Collapse)AuthorAgeFilesLines
* feat(format): extra newline after modelinePhạm Huy Hoàng2024-02-291-0/+1
|
* chore: query formattingPham Huy Hoang2024-01-191-12/+12
|
* 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(javascript): highlight parameter destructuring patternsAnanda Umamil2023-07-011-0/+19
|
* highlights(javascript): "?." -> optional_chainGitHub2022-08-201-0/+3
|
* 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-101-272/+1
|
* feat(javascript): move shorthand prop to propertySteven Sojka2021-01-261-5/+3
|
* 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
* javascript: Mark shorthand_property_identifier as variablerockerBOO2020-11-271-0/+1
|
* javascript: Add operator to / for division (#689)Dave Lage2020-11-251-0/+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
|
* 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(queries): modeline mechanism for base langsThomas Vigouroux2020-10-111-0/+1
| | | | | | | | 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
* 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
|
* fix(highlights): add missing js operatorsSteven Sojka2020-09-101-17/+30
|
* @function.method -> @methodNathan Smith2020-08-171-6/+6
|
* chore(highlights): remove is predicate usageSteven Sojka2020-08-171-6/+0
|
* some refacto, doc fixes and jsx querieskiyan422020-08-171-1/+2
| | | | | | | | | | - compute query language extensions *after* default ones (jsx after javascript) - remove outdated ts_utils functions from docs - add better regex detection to javascript - javascriptreact to use javascript queries - add javascript.jsx to javascript queries - write jsx.scm hl file
* fix(queries): use vim-match for non lua regexesSteven Sojka2020-08-161-3/+3
|
* feat(highlights): add is predicateSteven Sojka2020-08-161-7/+14
|
* add rest_parameters as definition in javascriptSteven Sojka2020-07-221-1/+5
|
* fix(javascript): set booleans to boolean highlightsSteven Sojka2020-06-151-2/+2
|
* feat(queries): add typescript and javascript queriesSteven Sojka2020-06-141-0/+190