aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorAnanda Umamil <zweimach@zweimach.org>2022-12-30 02:11:49 +0700
committerStephan Seitz <stephan.seitz@fau.de>2022-12-29 21:04:14 +0100
commite5dd204291d16f1061157711a69884f7a2fe02b1 (patch)
treed1bc2ada7ae2ef0f5729193c1da9931652044f8c /queries
parentUpdate parsers: tlaplus (diff)
downloadnvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.tar
nvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.tar.gz
nvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.tar.bz2
nvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.tar.lz
nvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.tar.xz
nvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.tar.zst
nvim-treesitter-e5dd204291d16f1061157711a69884f7a2fe02b1.zip
highlights(haskell): lambda and function with type signature
Diffstat (limited to 'queries')
-rw-r--r--queries/haskell/highlights.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/queries/haskell/highlights.scm b/queries/haskell/highlights.scm
index fa342fb8e..297a410da 100644
--- a/queries/haskell/highlights.scm
+++ b/queries/haskell/highlights.scm
@@ -111,9 +111,12 @@
(function
name: (variable) @function
patterns: (patterns))
-((signature (fun)) . (function (variable) @function))
-((signature (context (fun))) . (function (variable) @function))
-((signature (forall (context (fun)))) . (function (variable) @function))
+(function
+ name: (variable) @function
+ rhs: (exp_lambda))
+((signature (variable) @_type (fun)) . (function (variable) @function) (#eq? @function @_type))
+((signature (variable) @_type (context (fun))) . (function (variable) @function) (#eq? @function @_type))
+((signature (variable) @_type (forall (context (fun)))) . (function (variable) @function) (#eq? @function @_type))
(exp_infix (variable) @operator) ; consider infix functions as operators