Christian Clason
c4f65272a9
fix(solidity): disable broken operators
2024-05-12 08:10:03 +00:00
Riley Bruins
f58cae6c22
feat: more @keyword.type captures
2024-05-01 09:59:50 +02:00
JoranHonig
3e1d836e0e
fix(solidity): adapt queries to parser changes
2024-04-13 20:04:38 +02:00
Amaan Qureshi
d90e11756d
fix(solidity): update queries from upstream ( #6424 )
2024-04-10 07:22:05 +00: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
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
Meet Mangukiya
cffa252f5e
feat: add solidity folds
2023-10-21 14:40:19 -04:00
zeroknots
86d0b2b1c0
solidity: Update highlights.scm ( #5453 )
...
https://soliditylang.org/blog/2021/04/21/custom-errors/
error keyword was introduced in 0.8.4
2023-09-27 15:08:46 +09:00
Amaan Qureshi
82bcd8483e
fix(solidity): variable should not match last, tidy up highlights
2023-04-25 14:19:44 -04:00
Zhizhen He
181a580190
fix: revert for solidity
2023-03-21 02:23:52 -04:00
Zhizhen He
a1df50a79f
docs: fix typo
2023-03-21 02:23:52 -04:00
Amaan Qureshi
5a87bc98da
feat: add @comment.documentation where applicable
2023-03-05 17:15:32 -05:00
Amaan Qureshi
5c511dd124
feat(solidity): use maintained parser and update highlights accordingly
2023-02-24 13:05:33 -08:00
dundargoc
4612212c72
docs: fix typos
2023-02-23 11:39:43 -08:00
ObserverOfTime
08bd9d0e08
highlights(solidity): use more specific groups
2022-11-26 13:17:51 +02:00
Stephan Seitz
f9d1c68cf9
highlights(solidity): use @function.call/@method.call
2022-09-11 04:16:06 -07:00
YongJieYongJie
fc0b881f93
Refactor solidity highlights.scm further
...
- Instead of @keyword, use @conditional, @exception, @return, @function
as appropriate
- Standardize to using @field (instead of @property)for struct members
2022-03-11 19:06:39 +01:00
YongJieYongJie
8f3991065d
Refactor solidity highlights.scm
...
- Use more specific/appropriate captures; change invalid captures
- Don't highlight punctuations in type names (e.g., the brackets in
'bytes32[]')
2022-03-11 19:06:39 +01:00
YongJieYongJie
a180859eea
Add highlights query for Solidity
2022-03-11 19:06:39 +01:00