bump tree-sitter-haskell and update queries (#8558)

pull/8554/head
Ryan Mehri 8 months ago committed by GitHub
parent cd591647ec
commit 814cf177d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1094,7 +1094,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]] [[grammar]]
name = "haskell" name = "haskell"
source = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "98fc7f59049aeb713ab9b72a8ff25dcaaef81087" } source = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "d7ac98f49e3ed7e17541256fe3881a967d7ffdd3" }
[[language]] [[language]]
name = "haskell-persistent" name = "haskell-persistent"

@ -33,6 +33,11 @@
;; ---------------------------------------------------------------------------- ;; ----------------------------------------------------------------------------
;; Keywords, operators, includes ;; Keywords, operators, includes
[
"forall"
"∀"
] @keyword.control.repeat
(pragma) @constant.macro (pragma) @constant.macro
[ [
@ -68,10 +73,7 @@
"@" "@"
] @operator ] @operator
(qualified_module (module) @constructor) (module) @namespace
(qualified_type (module) @namespace)
(qualified_variable (module) @namespace)
(import (module) @namespace)
[ [
(where) (where)
@ -92,8 +94,6 @@
"do" "do"
"mdo" "mdo"
"rec" "rec"
"forall"
"∀"
"infix" "infix"
"infixl" "infixl"
"infixr" "infixr"
@ -104,22 +104,35 @@
;; Functions and variables ;; Functions and variables
(signature name: (variable) @type) (signature name: (variable) @type)
(function name: (variable) @function) (function
name: (variable) @function
(variable) @variable patterns: (patterns))
"_" @variable.builtin ((signature (fun)) . (function (variable) @function))
((signature (context (fun))) . (function (variable) @function))
((signature (forall (context (fun)))) . (function (variable) @function))
(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_infix (exp_name) @function)
(exp_apply . (exp_name (variable) @function))
(exp_apply . (exp_name (qualified_variable (variable) @function)))
(variable) @variable
(pat_wildcard) @variable
;; ---------------------------------------------------------------------------- ;; ----------------------------------------------------------------------------
;; Types ;; Types
(type) @type (type) @type
(type_variable) @type
(constructor) @constructor (constructor) @constructor
; True or False ; True or False
((constructor) @_bool (#match? @_bool "(True|False)")) @constant.builtin.boolean ((constructor) @_bool (#match? @_bool "(True|False)")) @constant.builtin.boolean
;; ----------------------------------------------------------------------------
;; Quasi-quotes
(quoter) @function
; Highlighting of quasiquote_body is handled by injections.scm

Loading…
Cancel
Save