mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
feat(haskell): tweak highlights
* add cases for `qualified_variable` * add function defined in terms of composition
This commit is contained in:
parent
0df364926d
commit
5240574bcb
2 changed files with 14 additions and 1 deletions
|
|
@ -173,6 +173,7 @@
|
||||||
(exp_name
|
(exp_name
|
||||||
[(constructor)
|
[(constructor)
|
||||||
(variable)
|
(variable)
|
||||||
|
(qualified_variable)
|
||||||
]))
|
]))
|
||||||
(quasiquote)
|
(quasiquote)
|
||||||
((exp_name) . (operator))
|
((exp_name) . (operator))
|
||||||
|
|
@ -186,6 +187,7 @@
|
||||||
(exp_name
|
(exp_name
|
||||||
[(constructor)
|
[(constructor)
|
||||||
(variable)
|
(variable)
|
||||||
|
(qualified_variable)
|
||||||
]))
|
]))
|
||||||
(quasiquote)
|
(quasiquote)
|
||||||
((exp_name) . (operator))
|
((exp_name) . (operator))
|
||||||
|
|
@ -293,6 +295,12 @@
|
||||||
])
|
])
|
||||||
(#any-of? @_op "." ">>>" "***" ">=>" "<=<" ))
|
(#any-of? @_op "." ">>>" "***" ">=>" "<=<" ))
|
||||||
|
|
||||||
|
; function defined in terms of a function composition
|
||||||
|
(function
|
||||||
|
name: (variable) @function
|
||||||
|
rhs: (exp_infix (_) . (operator) @_op . (_)
|
||||||
|
(#any-of? @_op "." ">>>" "***" ">=>" "<=<")))
|
||||||
|
|
||||||
(exp_apply (exp_name
|
(exp_apply (exp_name
|
||||||
[
|
[
|
||||||
((variable) @function.call)
|
((variable) @function.call)
|
||||||
|
|
@ -325,7 +333,7 @@
|
||||||
. (variable) @variable
|
. (variable) @variable
|
||||||
. [
|
. [
|
||||||
(exp_record)
|
(exp_record)
|
||||||
(exp_name (variable))
|
(exp_name [(variable) (qualified_variable)])
|
||||||
(exp_list)
|
(exp_list)
|
||||||
(exp_tuple)
|
(exp_tuple)
|
||||||
(exp_cond)
|
(exp_cond)
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,8 @@ someIOaction = do
|
||||||
gunc x y = func x $ y + 7
|
gunc x y = func x $ y + 7
|
||||||
-- ^ @variable
|
-- ^ @variable
|
||||||
-- ^ @variable
|
-- ^ @variable
|
||||||
|
valueFromList = HashSet.fromList []
|
||||||
|
-- ^ @variable
|
||||||
when foo $ putStrLn $ T.showt =<< bar
|
when foo $ putStrLn $ T.showt =<< bar
|
||||||
-- ^ @function.call
|
-- ^ @function.call
|
||||||
-- ^ @variable
|
-- ^ @variable
|
||||||
|
|
@ -325,3 +327,6 @@ lambdaAlias _ _ _ = undefined
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
spec = describe "test ns" $ it "test case" pending
|
spec = describe "test ns" $ it "test case" pending
|
||||||
-- ^ @variable
|
-- ^ @variable
|
||||||
|
|
||||||
|
composed = f . g
|
||||||
|
-- ^ @function
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue