Marc Jakobi
da0efd7398
fix(haskell): update queries and tests for rewritten parser ( #6580 )
2024-05-07 07:27:44 +00:00
Christian Clason
497208692f
fix(compile): add /utf-8 flag on win+cl
2024-04-14 14:08:51 +02:00
Phạm Huy Hoàng
722617e672
refactor(format): drop extra indentation for field
2024-03-21 15:51:26 +01:00
再生花
31641d72a4
feat(format-scripts): linewrap predicates
...
"format-ignore".kick()
2024-02-23 10:42:01 +02:00
Christian Clason
1ea4a0afd5
fix(haskell): comment out unsafe utf8 node
2024-02-15 09:16:29 +00:00
Phạm Huy Hoàng
77e298e4de
chore: format queries
2024-01-21 23:55:02 +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
Marc Jakobi
732c8cb0b4
highlights(haskell): add fail to exception highlights
2023-12-20 13:08:06 +01:00
Marc Jakobi
96e01877b8
highlights(haskell): namespaced string quasiquote
2023-12-20 13:07:44 +01: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
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
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
Marc Jakobi
ec0e344f6e
feat(highlights): some haskell additions
...
- Re-add (module) @namespace
- Exception handling
- Debugging
- `otherwise` = boolean `True`
- `qq` string quasiquotes
- Documentation comments (draft)
- Function/lambda parameters
- Remove recently added @ (already defined as an operator)
2023-09-27 17:18:14 +02:00
Marc Jakobi
f3fb301b26
feat(highlights): some haskell improvements
2023-09-25 13:01:31 +02:00
ShellCode33
d9e75a1736
queries/*/highlights.scm : remove @spell for strings
2023-08-07 16:39:40 +01:00
Stephan Seitz
372177fb99
highlights(haskell): don't match True|False in other identifiers
...
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: Guillaume Bouchard <guibou@users.noreply.github.com>
2023-01-14 14:29:00 -08:00
Ananda Umamil
0b69c4ae52
highlights(haskell): special sigils and operators
2023-01-14 13:11:49 -08:00
Ananda Umamil
1298d9ba3b
highlights(haskell): function and variable bindings
2023-01-11 20:07:16 +01:00
Manuel Barros
3a621b9a83
highlights(haskell): Fix partially applied infix functions
2023-01-01 18:23:57 +01:00
Ananda Umamil
e5dd204291
highlights(haskell): lambda and function with type signature
2022-12-29 21:04:14 +01:00
ObserverOfTime
1da0a88ebc
highlights(haskell): fix captures
2022-11-26 13:17:51 +02:00
Jade Lovelace
aa736f5f36
haskell/highlights: Match pattern as a keyword
...
Sample:
-- | Smart constructor that deduplicates plugins
pattern IdePlugins :: [PluginDescriptor ideState] -> IdePlugins ideState
pattern IdePlugins{ipMap} <- IdePlugins_ (sortOn (Down . pluginPriority) . HashMap.elems -> ipMap) _
where
IdePlugins ipMap = IdePlugins_{ipMap_ = HashMap.fromList $ (pluginId &&& id) <$> ipMap
, lookupCommandProvider = lookupPluginId ipMap
}
2022-09-27 21:38:16 -04:00
Stephan Seitz
600ac0f358
highlights(haskell): use @function.call
2022-09-11 04:16:06 -07:00
Guillaume Bouchard
82f48cfe75
Add @spell directives for haskell
2022-09-10 11:18:18 -07:00
Kiyan
372b007231
fix(haskell): priority 101 for infix function precedence over variable ( #3085 )
2022-07-01 15:47:28 +02:00
kiyan
74ec4e1d5c
fix(haskell): highlight exp_name as function in infix operations
2022-06-25 11:43:11 +02:00
Ananda Umamil
a76e1eb89d
highlights(haskell): function with type signature
2022-01-13 21:48:35 +01:00
Ananda Umamil
50fee51d35
Improve Haskell highlighting
2022-01-08 12:37:11 +01:00
Farbod Salamat-Zadeh
efbd01f539
Add common quasiquote highlights/injections for Haskell ( #1440 )
2021-07-01 00:43:08 +00:00
elianiva
f9bce468a0
feat(haskell): improve highlight query
...
Co-authored-by: Farbod Salamat-Zadeh <12140044+farbodsz@users.noreply.github.com>
2021-06-26 12:10:52 +02:00
elianiva
684b74bea1
feat: add haskell highlights
2021-06-26 12:10:52 +02:00