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
Christian Clason
cc908cfcd7
fix(dart): replace slow indent with simpler strategy
...
Pattern for dedenting else blocks is painfully slow (~20% of total test
time), so replace with `@indent.auto` for the whole `if_statement` for
now.
2024-01-25 13:12:53 +01: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
Christian Clason
5b90ea2aba
feat(locals)!: switch to upstream captures
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
Pham Huy Hoang
78b54eb7f6
chore(injections)!: update injection syntax to 0.9
...
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated.
Because of that, new syntax should be adopted once 0.9 becomes the
baseline requirements for nvim-treesitter
- update health check
- update doc
2023-08-12 17:34:15 +02:00
David Zeng
51dfcfdfde
feat(dart): improve locals query ( #4922 )
2023-06-09 12:48:24 +03:00
Amaan Qureshi
46ddea9dec
fix(dart): update indents from upstream ( #4924 )
2023-06-07 20:10:54 +02:00
Amaan Qureshi
85330918f0
perf: remove match where possible
2023-04-21 18:24:17 -04:00
Pham Huy Hoang
36d4deb294
fix(dart_indent): Fix dart case/default indent
...
add tests
add tests for fallthrough case
add more tests
keep functional tests
2023-04-14 02:28:42 -07:00
Robert Brunhage
ce3ea7aebe
Revert "fix(dart): function argument indents is inconsistent"
...
This reverts commit ac4020c707 .
2023-04-13 02:31:49 -07:00
Robert Brunhage
ac4020c707
fix(dart): function argument indents is inconsistent
2023-04-11 03:09:53 -07:00
Robert Brunhage
2fe7f969c1
fix(dart): try statement wouldn't indent ( #4623 )
2023-04-10 06:52:50 +00: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
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
Amaan Qureshi
53695580e3
feat(dart): add folds
2023-02-24 16:24:23 -08:00
SzeLamC
68ab44277c
fix(dart): add @indent_end to } ( #4167 )
...
* fix dart indentation after }
* add some simple test case
2023-02-24 16:06:31 -05: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
Santos Gallegos
67f0857015
Revert "Comment: use @combined to create just one tree per buffer ( #1252 )"
...
This reverts commit 4a7a713c52 .
2021-05-07 16:51:57 +02:00
Santos Gallegos
4a7a713c52
Comment: use @combined to create just one tree per buffer ( #1252 )
...
* 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-28 07:19:07 -05: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
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags ( #893 )
...
Closes #236
2021-03-12 11:21:46 -05:00
elianiva
d0ea01bed9
feat(dart): add indents
2021-03-08 23:13:27 +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