on master help sign in
Restored haskell syntax
01dd7b5Corey Powell
helix-syntax/languages/tree-sitter-haskellnew file+1

Submodule changed.

helix-syntax/src/lib.rs+1−1
@@ -74,7 +74,7 @@ mk_langs!(
74 (Css, tree_sitter_css),
74 (Css, tree_sitter_css),
75 (Elixir, tree_sitter_elixir),
75 (Elixir, tree_sitter_elixir),
76 (Go, tree_sitter_go),
76 (Go, tree_sitter_go),
77− // (Haskell, tree_sitter_haskell),
77+ (Haskell, tree_sitter_haskell),
78 (Html, tree_sitter_html),
78 (Html, tree_sitter_html),
79 (Java, tree_sitter_java),
79 (Java, tree_sitter_java),
80 (Javascript, tree_sitter_javascript),
80 (Javascript, tree_sitter_javascript),
languages.toml+9
@@ -144,3 +144,12 @@ file-types = ["php"]
144roots = []
144roots = []
145
145
146indent = { tab-width = 2, unit = " " }
146indent = { 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