Caleb White
4ebf4ca4fa
chore(php): trim down tests
2024-03-27 08:29:44 +01:00
Caleb White
7d938c1c72
fix(php): fix use_{as,instead_of}_clause highlights
2024-03-27 08:29:44 +01:00
Caleb White
3400788705
feat(php): add highlight tests
2024-03-27 08:29:44 +01:00
Noah
03f650705c
Update Clojure highlights to be metadata aware ( #6213 )
2024-03-19 22:10:41 +01:00
Caleb White
143ca5ce17
feat(php): improve indents in return statements & chained methods
2024-03-16 20:50:13 -04:00
Jaehwang Jung
dccf31f9b1
feat(highlights)!: @keyword.storage → @keyword.modifier
2024-03-16 20:51:16 +08:00
Jaehwang Jung
998b230a77
feat(highlights)!: keyword @type.qualifier → @keyword.modifier
2024-03-16 20:51:16 +08:00
Luckas
904f373fc4
feat(dot): add indents queries
...
* feat(dot): add indents queries
* add: tests
* fix: test
2024-03-15 09:18:33 +09:00
再生花
e73c775aa9
feat(swift): add init/deinit indents
...
Signed-off-by: Phạm Huy Hoàng <hoangtun0810@gmail.com>
2024-03-13 11:09:42 +08:00
Phạm Huy Hoàng
63ca90eaa3
feat(swift): add will/didSet indent
...
Fixes CI error in PR.6237
2024-03-04 00:05:45 +09:00
Christian Clason
99ddf57353
feat(highlights)!: enforce documented captures ( #6232 )
...
Problem: Allowing undocumented "secret" (sub)captures makes it harder
to write comprehensive colorschemes and catch inconsistent captures.
Solution: Only allow captures listed in CONTRIBUTING.md. Add useful
(cross-language) subcaptures and drop language-specific or too niche
ones.
Follow-up: Adding further `*.builtin` captures and changing queries to
use them.
Language-specific subcaptures should instead be added in user config or
a custom language plugin.
2024-03-03 11:00:11 +01:00
Riley Bruins
455f6586ba
feat(query): indents that reflect the formatter ( #6154 )
...
* feat(query): indents that reflect the formatter
Indentation queries that reflect the query formatter. Only applicable if `lispoptions=expr:1`
2024-02-21 18:47:09 +09:00
Riley Bruins
d96bf9d522
fix(python): better try-except indentation ( #6097 )
2024-02-15 00:39:59 +07:00
Phạm Huy Hoàng
1c72e797ba
fix(yuck): comment out start-of-line parens
2024-02-13 17:58:36 +01:00
Riley Bruins
127cf25737
feat(latex): pre-compiled header highlights, tests
...
Also moves comment highlights to the very end to make them more
future-proof.
2024-02-06 10:29:09 +01:00
Jędrzej Boczar
6548bb64c1
feat(meson): add indents.scm
2024-01-20 10:48:56 +01:00
ObserverOfTime
fa38f4e6f9
fix(highlights): improve member/property distinction
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
10dd49958c
chore(tests): consistent captures
2024-01-19 16:58:37 +01:00
Jędrzej Boczar
d496c5e08e
fix(cpp): incorrect indent of class with opening { on new line ( #5811 )
2023-12-22 05:49:13 +09:00
Marc Jakobi
5240574bcb
feat(haskell): tweak highlights
...
* add cases for `qualified_variable`
* add function defined in terms of composition
2023-11-18 19:02:29 -05:00
Mark McCulloh
17e77749c1
fix(wing): update parser and queries, add maintainer ( #5671 )
2023-11-13 19:04:27 +00:00
Pham Huy Hoang
80f66cdef1
injections(vue): inject typescript instead of js ( #5577 )
...
Interpolations (`{{valid js code}}`) and directive attributes
(`<element :directive="valid js code"`) can also be typescript code,
hence we can inject typescript instead of javascript here and still
be ok with highlights (bar some syntax differences between ts and js)
2023-11-06 11:04:13 +09:00
Ronan Arraes Jardim Chagas
d2fe87062d
Add more tests for assignments
2023-10-29 01:37:31 +02:00
Ronan Arraes Jardim Chagas
a741b5dd0d
Improve curly expression alignment
2023-10-29 01:37:31 +02:00
Ronan Arraes Jardim Chagas
3d6c0af936
Fix tests
2023-10-29 01:37:31 +02:00
Ronan Arraes Jardim Chagas
fc3bfd8f89
Add initial tests for Julia language indentation
2023-10-29 01:37:31 +02:00
Carlos Afonso
bf87a16712
fix(php): fix indentation for in between braces
2023-10-15 14:34:32 -04:00
Marc Jakobi
d33dbdab01
feat(haskell): highlights improvements
...
- Consider functions with only one value on the rhs as variables
- Applied composition: `(f . g) <param>` -> `@function.call`
- View patterns
- `@field` in record update expression
- type_tuple and type_list as variables
- quantifier for `exp_apply (<rhs>)+ (variable)`
- type_tuple and type_list as variables
- Treat signatures with only one value on the rhs as variables
(except for `IO a`) -> Fixes #5505 .
- Remove redundant anchors from signature function queries.
- Move signature function queries to give them higher priority
- Scoped function types
- Add signature query to function with parameters query
2023-10-15 14:32:51 -04:00
Marc Jakobi
783e5fc307
feat(nix): some highlight improvements
...
- functions
- builtin functions with prefix
- add test file
2023-10-12 19:04:55 +00:00
Marc Jakobi
0eb1a0ad1c
fix(haskell): prevent segfault due to anchorless queries ( #5502 )
2023-10-10 17:12:36 +09:00
Marc Jakobi
6276cd9d41
fix(haskell): highlight fixes ( #5470 )
...
* fix(haskell): highlight fixes + merge qualified/unqualified queries
* fix(haskell): lambda params + add exp_record to function.call args
* style: apply PR suggestions
2023-10-05 20:04:46 +03:00
Marc Jakobi
d96c216c54
feat(haskell): highlights improvements + tests ( #5466 )
2023-10-02 10:49:12 +00:00
Christian Segundo
dac6efbaff
fix(dockerfile): bash injection on run instructions
2023-09-17 16:32:21 +02:00
Christian Segundo
831dbb619e
fix(yaml): promql injections block
2023-09-15 12:53:44 +02:00
Christoph Sax
5ec4217567
fix(t32): update indent queries & test
...
The latest release of the grammar changes the handling of consecutive
line breaks. This breaks the existing test for indents.
This commit updates the indent queries and fixes the associated test.
2023-09-14 20:07:02 +02:00
Noah
e942c720ac
fix(clojure): fix field highlighting ( #5319 )
2023-08-27 10:25:43 +03:00
ObserverOfTime
1ff7985a74
feat(bash): improve highlights
2023-08-24 12:11:16 +03:00
TheLeoP
bbb92b2b8e
fix(lua): luap injection ( #5275 )
...
* fix(lua): luap injection
* test(lua): check for incorrect hlgroup of injected luap
* chore(lua): injections styling
* chore(lua): ignore luacheck for test.lua
2023-08-18 02:17:04 +00:00
Christoph Sax
0fe8fa0bcf
feat(t32): update tests to new node types
2023-07-30 19:29:33 +02:00
Christoph Sax
536c8a3880
feat(t32): re-enable tests
...
- Switch to GitLab mirror repository
- Lock grammar version 2.2.0
- Revert "fix(tests): mark t32 as allowed to fail"
This reverts commit ba223ceecc .
- Revert "fix(tests): remove t32 tests"
This reverts commit 97957a547b .
2023-07-30 19:29:33 +02:00
Christian Clason
97957a547b
fix(tests): remove t32 tests
...
t32 parser is hosted on Codeberg, which has frequent outages that block
unrelated CI. Revert this commit if and when uptime has improved.
2023-07-29 10:56:17 +02:00
Amaan Qureshi
ad3805f5c3
fix(c)!: update C, CPP parsers and queries
...
also update derived parsers (arduino, cuda, glsl, hlsl, ispc, objc)
2023-07-27 09:51:13 +02:00
Michael Hoffmann
b64ea2ec44
feat(promql,yaml): add parser and yaml injections
...
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
2023-07-18 03:03:11 -04:00
Glib Shpychka
f460cc8ee7
feat(wing): add parser ( #5021 )
...
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2023-06-29 10:34:46 +00:00
Pham Huy Hoang
9ec2a6bbda
tests: fix failed tests ( #4901 )
...
fix failed tests for tiger, t32 and wgsl
2023-06-05 09:52:36 +09:00
Pham Huy Hoang
1281601cb4
feat: add indents for annotation defs ( #4828 )
...
- Add indent for `@interface` and `@Annotation(...)`
- Add notes for indent queries
2023-06-04 13:28:41 +09:00
Will Ruggiano
79aedc9675
feat(prisma): highlight views
2023-06-04 00:05:57 -04:00
Ananda Umamil
bee003b880
feat(ecma): convert eligible @keyword.operators
2023-06-04 00:04:40 -04:00
Alex Manning
f84de0d6cd
fix(gleam): minor indent fixes
2023-06-04 10:39:20 +09:00