Commit graph

48 commits

Author SHA1 Message Date
Riley Bruins
f58cae6c22 feat: more @keyword.type captures 2024-05-01 09:59:50 +02:00
Phạm Huy Hoàng
722617e672 refactor(format): drop extra indentation for field 2024-03-21 15:51:26 +01:00
Jaehwang Jung
998b230a77 feat(highlights)!: keyword @type.qualifier@keyword.modifier 2024-03-16 20:51:16 +08:00
Phạm Huy Hoàng
62b0bb4f24 feat(format): extra newline after modeline 2024-02-29 23:05:30 +09:00
Amaan Qureshi
90327d9e73 chore(typescript,tsx): update parser and queries 2024-01-31 22:31:50 -05:00
Phạm Huy Hoàng
77e298e4de chore: format queries 2024-01-21 23:55:02 +09:00
Pham Huy Hoang
57a8acf0c4 chore: query formatting 2024-01-19 16:58:37 +01:00
Christian Clason
1ae9b0e455 feat!: align standard captures with upstream
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"
  (3f44b89685/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`
2024-01-19 16:58:37 +01:00
Christian Clason
5b90ea2aba feat(locals)!: switch to upstream captures 2024-01-19 16:58:37 +01:00
Munif Tanjim
f8fcb0da06 fix(typescript): do not highlight undefined as variable 2023-10-15 13:15:22 +03:00
Stephan Seitz
08c830f625 folds(typescript): add enum_declaration
Fixes #5325
2023-08-27 16:01:05 -04:00
Ananda Umamil
44211e7f6e
feat(typescript): highlight decorators, default case, global declaration 2023-07-17 14:19:28 -04:00
Ananda Umamil
aab2274e2c
feat(javascript): highlight parameter destructuring patterns 2023-07-01 05:25:05 -04:00
Amaan Qureshi
99606fdb71 feat(typescript): update highlights 2023-06-09 01:58:28 +09:00
Ananda Umamil
bee003b880
feat(ecma): convert eligible @keyword.operators 2023-06-04 00:04:40 -04:00
Ananda Umamil
56022e0b05
feat(typescript): highlight is and : in type predicate 2023-06-04 00:04:00 -04:00
Amaan Qureshi
6e8ad92031 feat(typescript): add non-null operator 2023-05-09 09:14:28 -04:00
Amaan Qureshi
a79baf0399 fix(typescript): remove duplicate capture 2023-05-09 09:14:28 -04:00
George Harker
cb568af539 use indent.X syntax for captures and properties of set directives
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
2023-03-24 13:07:53 -04:00
Amaan Qureshi
87cf2abeb6 feat(typescript): add various missing function/method captures 2023-03-22 18:03:20 -04:00
Ananda Umamil
5d59d18d3e highlights(typescript): infer, template literal type & punctuations 2023-03-11 04:56:44 -05:00
Ananda Umamil
1d6e1354b7 highlights(typescript): add module keyword 2022-12-13 21:10:26 +01:00
ObserverOfTime
46ecf825f0 highlights(typescript): use more specific groups 2022-11-26 13:17:51 +02:00
Raymond Ha
ef24c633f6 highlights(typescript): Fix as highlight 2022-11-25 00:34:25 +01:00
Raymond Ha
1b3f93dcb9
highlights(typescript): add satisfies keyword (#3852) 2022-11-24 16:27:42 +00:00
ObserverOfTime
2be75015e8 highlights(typescript): add override keyword 2022-10-15 08:12:55 -07:00
GitHub
9dd1065ebe highlights(javascript): "?." -> optional_chain 2022-08-20 10:42:19 +02:00
Munif Tanjim
b8d7853b88 highlights(typescript): fix indentifier for type imports 2021-07-01 22:50:06 +02:00
Stephan Seitz
788d212ab3
locals(js,ts): Add parameters again (#1231) 2021-04-28 07:39:14 -05:00
Stephan Seitz
082d2ef6e1
Add JS/TS parameters again (#1227)
* highlights(js): add parameters

* highlights(ts): add Typescript parameters
2021-04-23 07:20:51 -05:00
Stephan Seitz
fac9fef397 Update jsonc to 0.19.0 2021-03-16 18:52:43 +01:00
Stephan Seitz
6cd211f647 Mark several invalid queries 2021-03-16 18:52:43 +01:00
Stephan Seitz
e3a863bd1c Fix readonly keyword in typescript 2021-03-16 18:52:43 +01:00
kiyan
3b8c2ea492 chore: create ecma base for use in js and ts which fixes jsx issues 2021-03-10 17:34:11 +01:00
elianiva
f84c93c484 fix: added missing enum indent for typescript 2021-01-21 18:17:54 +01:00
elianiva
9184cf3953 feat: added more indent queries 2021-01-14 14:43:04 +01:00
Dave Lage
ff1c77b206
Javascript unary expression (#712)
* javascript: Move unary_expression matching.

* javascript: Move unary_expression matching.

* javascript: Update unary to operator

* javascript: Update qnary to be more specific
2020-12-12 14:47:09 -06:00
rockerBOO
299b874d2f typescript: Use javascript shorthand_property_identifier 2020-11-27 22:20:32 +01:00
rockerBOO
e59a789289 typescript: Add optional_parameter ? 2020-11-22 16:59:58 +01:00
rockerBOO
7566d397d4 Add type delimiters | &, Add optional type ? 2020-11-15 10:24:46 +01:00
rockerBOO
d8d2eefa01 Add additional punctuation, variable descriptors for Typescript 2020-11-15 10:24:46 +01:00
Steven Sojka
d9454afd93 feat(js): add jsdoc lang injection 2020-10-27 14:08:14 +01:00
Thomas Vigouroux
c055899dc0 feat(queries): modeline mechanism for base langs
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.
2020-10-11 19:09:22 +02:00
Santos Gallegos
50991e370b Folds: rename query files to folds.scm to be consistent
We use plural names for all query files except folds.
2020-09-14 18:26:30 +02:00
Steven Sojka
02735aae55 feat(folds): add ts and js folds 2020-09-06 17:20:43 +02:00
Steven Sojka
881eff1c60 fix(highlights): fix ts parameter highlights 2020-09-06 16:59:03 +02:00
Steven Sojka
a600be80b6 chore(queries): use inherited queries for ts/js 2020-06-15 08:53:49 -05:00
Steven Sojka
ac8ae3b1c7 feat(queries): add typescript and javascript queries 2020-06-14 13:41:23 -05:00