on master help sign in
Restored haskell syntax

It seems to work

commit01dd7b570a692ca59d34c74806e7fcdd48e60b21 authorCorey Powell <mistdragon100@gmail.com> dateTue 1 Jun 2021, 14:44 (5 years ago) parentf3a243c
5 files changed+58−1
helix-syntax/languages/tree-sitter-haskell+1 helix-syntax/src/lib.rs+1−1 languages.toml+9 runtime/queries/haskell/highlights.scm+43 runtime/queries/haskell/locals.scm+4
helix-syntax/languages/tree-sitter-haskellnew file+1

Submodule changed.

helix-syntax/src/lib.rs+1−1
@@ -74,7 +74,7 @@ mk_langs!(
7474 (Css, tree_sitter_css),
7575 (Elixir, tree_sitter_elixir),
7676 (Go, tree_sitter_go),
77− // (Haskell, tree_sitter_haskell),
77+ (Haskell, tree_sitter_haskell),
7878 (Html, tree_sitter_html),
7979 (Java, tree_sitter_java),
8080 (Javascript, tree_sitter_javascript),
languages.toml+9
@@ -144,3 +144,12 @@ file-types = ["php"]
144144roots = []
145145
146146indent = { tab-width = 2, unit = " " }
147+
148+[[language]]
149+name = "haskell"
150+scope = "source.haskell"
151+injection-regex = "haskell"
152+file-types = ["hs"]
153+roots = []
154+
155+indent = { tab-width = 2, unit = " " }
runtime/queries/haskell/highlights.scmnew file+43
@@ -0,0 +1,43 @@
1+(variable) @variable
2+(operator) @operator
3+(exp_name (constructor) @constructor)
4+(constructor_operator) @operator
5+(module) @module_name
6+(type) @type
7+(type) @class
8+(constructor) @constructor
9+(pragma) @pragma
10+(comment) @comment
11+(signature name: (variable) @fun_type_name)
12+(function name: (variable) @fun_name)
13+(constraint class: (class_name (type)) @class)
14+(class (class_head class: (class_name (type)) @class))
15+(instance (instance_head class: (class_name (type)) @class))
16+(integer) @literal
17+(exp_literal (float)) @literal
18+(char) @literal
19+(con_unit) @literal
20+(con_list) @literal
21+(tycon_arrow) @operator
22+(where) @keyword
23+"module" @keyword
24+"let" @keyword
25+"in" @keyword
26+"class" @keyword
27+"instance" @keyword
28+"data" @keyword
29+"newtype" @keyword
30+"family" @keyword
31+"type" @keyword
32+"import" @keyword
33+"qualified" @keyword
34+"as" @keyword
35+"deriving" @keyword
36+"via" @keyword
37+"stock" @keyword
38+"anyclass" @keyword
39+"do" @keyword
40+"mdo" @keyword
41+"rec" @keyword
42+"(" @paren
43+")" @paren
runtime/queries/haskell/locals.scmnew file+4
@@ -0,0 +1,4 @@
1+(signature name: (variable)) @local.definition
2+(function name: (variable)) @local.definition
3+(pat_name (variable)) @local.definition
4+(exp_name (variable)) @local.reference