Commit graph

51 commits

Author SHA1 Message Date
Riley Bruins
f58cae6c22 feat: more @keyword.type captures 2024-05-01 09:59:50 +02:00
Jaehwang Jung
998b230a77 feat(highlights)!: keyword @type.qualifier@keyword.modifier 2024-03-16 20:51:16 +08:00
再生花
31641d72a4
feat(format-scripts): linewrap predicates
"format-ignore".kick()
2024-02-23 10:42:01 +02:00
Phạm Huy Hoàng
fef26b5eee
fix(format): fix nested grouping indentation (#6128) 2024-02-18 23:13:39 +09:00
Phạm Huy Hoàng
77e298e4de chore: format queries 2024-01-21 23:55:02 +09:00
Phạm Huy Hoàng
d198a75e2c
Fixup format (#5934)
* fix(format): newline between top-level field defs

* fixup: newline between node and comment

* fixup: optimize pattern
2024-01-20 18:47:56 +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
Pham Huy Hoang
107e61afb7 refactor: Remove all (ERROR) @error captures
As discussed in PR#5421, capturing `@error` is inconsistent, requiring
deep nesting (or priority) in order to correctly have red backgrounds to
it.

Some queries has this capture, some don't. For consistency purposes,
removing all of them is more preferable.

For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)`
to your custom queries.
2023-10-25 18:18:50 +02:00
nedia
9409160748
feat(dart): add base, final & sealed class modifier highlights 2023-09-19 09:30:17 +00:00
Amaan Qureshi
8ecf630b8e fix(dart): update queries from upstream 2023-08-24 03:08:45 -04:00
Amaan Qureshi
85330918f0 perf: remove match where possible 2023-04-21 18:24:17 -04:00
Amaan Qureshi
5a87bc98da feat: add @comment.documentation where applicable 2023-03-05 17:15:32 -05:00
Amaan Qureshi
33ba346e60 feat!: add @keyword.coroutine capture 2023-03-03 07:07:52 -08:00
dundargoc
4612212c72 docs: fix typos 2023-02-23 11:39:43 -08:00
ObserverOfTime
fe2ee54f3b highlights(dart): use more specific groups 2022-11-26 13:17:51 +02:00
antonk52
90f15d9bf7 feat(keywords) merge return and yield into keyword.return group 2021-07-04 21:49:17 +02:00
antonk52
bd9095e969 feat(keywords) add keyword.return & keyword.yield 2021-07-04 21:49:17 +02:00
Akin Sowemimo
106eb8e500 feat(dart): add function call expression highlight
This is a work around since currently the upstream grammar does not
support a call_expression
2021-07-02 01:56:55 +02:00
Akin Sowemimo
5fa8d5741d feat(dart): add function call query (commented) 2021-07-01 16:02:24 +02:00
Akin Sowemimo
f67a749b0f feat(dart): add multiplicative_operator
and fix conditional_assignable_selector
2021-07-01 16:02:24 +02:00
Akin Sowemimo
fce41bbb6e fix: assignable selector was removed/hidden 2021-06-06 23:57:01 +02:00
Akin Sowemimo
0efa1ec83a feat(dart): add late & required keywords 2021-05-19 23:13:37 +02:00
Akin Sowemimo
db31158fda fix: uppercase variables being highlighted as type 2021-05-18 23:12:56 +02:00
Akin Sowemimo
3633684b47 feat: replace match with any-of 2021-05-18 23:12:56 +02:00
Akin Sowemimo
d3f5802fba fix: remove duplicate type identifier queries 2021-05-18 23:12:56 +02:00
Akin Sowemimo
bd5fc9a3c9 feat(dart): add async/sync* to highlights 2021-05-18 23:12:56 +02:00
Stephan Seitz
6cf578084d Remove invalid dart query 2021-03-16 18:52:43 +01:00
Stephan Seitz
6cd211f647 Mark several invalid queries 2021-03-16 18:52:43 +01:00
Dennis B
aca33c0aca [highlights] Add TSSymbol highlight group
Addresses issue #892

Ruby and Dart literal symbols will now be highlighted by the new
TSSymbol highlight group, which itself will, by default, link to the Vim
Identifier highlight group. Vim theme authors can then set their
TSSymbol colors.

Symbol highlighting can apply to a number of languages as noted in the
following Wikipedia page: https://en.wikipedia.org/wiki/Symbol_(programming)

Not just for Ruby and Dart.
2021-03-04 06:19:40 +01:00
Stephan Seitz
1058c11f46 Dart: Highlight escape sequences 2020-11-15 10:27:25 +01:00
Stephan Seitz
f92978e409 Dart: Highlight identifier_dollar_escaped 2020-11-15 10:27:25 +01:00
Stephan Seitz
93f9708a3c Dart highlights: Reset highlight in interpolation 2020-10-05 06:37:31 +02:00
Akin Sowemimo
0e37148dd1 Add extension and on keywords 2020-09-27 17:42:27 +02:00
Akin Sowemimo
98c12ec23a Improve the highlighting for class instantiation
So it finds _HiddenClasses as well as OtherClasses
2020-09-24 00:00:59 +02:00
Akin Sowemimo
3652bed53e Re-add attribute highlight 2020-09-18 21:30:13 +02:00
Akin Sowemimo
8cc0b8d4c4 Add case builtin
Based on accepted PR to unhide this node
Also show Function as a type correctly
and use existing annotation highlight for annotations
2020-09-18 21:30:13 +02:00
Thomas Vigouroux
b90e520ccd ci: fix wrong queries 2020-09-11 12:02:35 +02:00
Steven Sojka
ce43dbf54c fix(queries): use vim-match for non lua regexes 2020-08-16 18:31:56 +02:00
Akin Sowemimo
941e40f659 Re add missing comments 2020-08-09 19:12:26 +02:00
Akin Sowemimo
1427c43cf0 Change capture groups and add variable highlights 2020-08-09 19:12:26 +02:00
Akin Sowemimo
aaa990053a Add break and increment operators and tweak formatting 2020-08-09 19:12:26 +02:00
Akin Sowemimo
942fe70452 Add todo comment and change this highlight group 2020-08-09 19:12:26 +02:00
Akin Sowemimo
d4fbbc05af Add new highlight queries 2020-08-09 19:12:26 +02:00
Stephan Seitz
121c44a23b Dart highlights: add documentation_comment 2020-07-26 17:23:46 +02:00
Stephan Seitz
8021a769ed Dart highlighs: disable invalid nodes after parser update to fix CI 2020-07-26 17:23:46 +02:00
Akin Sowemimo
599bec3890 Rename attribute to annotation 2020-07-23 17:17:03 +02:00
Akin Sowemimo
72efa353f0 Remove todo comment 2020-07-23 17:17:03 +02:00
Akin Sowemimo
12feef7af8 Add getter and setter signature highlights 2020-07-23 17:17:03 +02:00
Akin Sowemimo
2ae63525dc Add some operators and match classes (with regex) 2020-07-23 17:17:03 +02:00