aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/haskell/test.hs
Commit message (Collapse)AuthorAgeFilesLines
* fix(haskell): update queries and tests for rewritten parser (#6580)Marc Jakobi2024-05-071-9/+20
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-62/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/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`
* feat(haskell): tweak highlightsMarc Jakobi2023-11-181-0/+5
| | | | | * add cases for `qualified_variable` * add function defined in terms of composition
* feat(haskell): highlights improvementsMarc Jakobi2023-10-151-5/+56
| | | | | | | | | | | | | | | | - 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
* fix(haskell): prevent segfault due to anchorless queries (#5502)Marc Jakobi2023-10-101-5/+4
|
* fix(haskell): highlight fixes (#5470)Marc Jakobi2023-10-051-6/+122
| | | | | | | * fix(haskell): highlight fixes + merge qualified/unqualified queries * fix(haskell): lambda params + add exp_record to function.call args * style: apply PR suggestions
* feat(haskell): highlights improvements + tests (#5466)Marc Jakobi2023-10-021-0/+161