mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
Improve Haskell highlighting
This commit is contained in:
parent
a7c0c1764b
commit
50fee51d35
1 changed files with 14 additions and 9 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
||||||
|
|
||||||
;; ----------------------------------------------------------------------------
|
;; ----------------------------------------------------------------------------
|
||||||
;; Punctuation
|
;; Punctuation
|
||||||
|
|
||||||
|
|
@ -72,10 +73,7 @@
|
||||||
"@"
|
"@"
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
(qualified_module (module) @constructor)
|
(module) @namespace
|
||||||
(qualified_type (module) @namespace)
|
|
||||||
(qualified_variable (module) @namespace)
|
|
||||||
(import (module) @namespace)
|
|
||||||
|
|
||||||
[
|
[
|
||||||
(where)
|
(where)
|
||||||
|
|
@ -96,27 +94,34 @@
|
||||||
"do"
|
"do"
|
||||||
"mdo"
|
"mdo"
|
||||||
"rec"
|
"rec"
|
||||||
|
"infix"
|
||||||
|
"infixl"
|
||||||
|
"infixr"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
|
||||||
;; ----------------------------------------------------------------------------
|
;; ----------------------------------------------------------------------------
|
||||||
;; Functions and variables
|
;; Functions and variables
|
||||||
|
|
||||||
(signature name: (variable) @type)
|
|
||||||
(function name: (variable) @function)
|
|
||||||
|
|
||||||
(variable) @variable
|
(variable) @variable
|
||||||
"_" @punctuation.special
|
(pat_wildcard) @variable
|
||||||
|
|
||||||
|
(signature name: (variable) @type)
|
||||||
|
(function
|
||||||
|
name: (variable) @function
|
||||||
|
patterns: (patterns))
|
||||||
|
|
||||||
(exp_infix (variable) @operator) ; consider infix functions as operators
|
(exp_infix (variable) @operator) ; consider infix functions as operators
|
||||||
|
|
||||||
("@" @namespace) ; "as" pattern operator, e.g. x@Constructor
|
(exp_apply . (exp_name (variable) @function))
|
||||||
|
(exp_apply . (exp_name (qualified_variable (variable) @function)))
|
||||||
|
|
||||||
|
|
||||||
;; ----------------------------------------------------------------------------
|
;; ----------------------------------------------------------------------------
|
||||||
;; Types
|
;; Types
|
||||||
|
|
||||||
(type) @type
|
(type) @type
|
||||||
|
(type_variable) @type
|
||||||
|
|
||||||
(constructor) @constructor
|
(constructor) @constructor
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue