diff options
| author | Phạm Huy Hoàng <hoangtun0810@gmail.com> | 2024-01-21 22:05:44 +0900 |
|---|---|---|
| committer | Phạm Huy Hoàng <hoangtun0810@gmail.com> | 2024-01-21 23:55:02 +0900 |
| commit | 77e298e4de607d69aa7f37dc6dcba6aee131ac7f (patch) | |
| tree | e3342d2c5b5244c13ee40c1ccc080192335ec277 /queries/haskell | |
| parent | fix(format-scripts): remove parens if possible (diff) | |
| download | nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.gz nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.bz2 nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.lz nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.xz nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.tar.zst nvim-treesitter-77e298e4de607d69aa7f37dc6dcba6aee131ac7f.zip | |
chore: format queries
Diffstat (limited to 'queries/haskell')
| -rw-r--r-- | queries/haskell/highlights.scm | 42 | ||||
| -rw-r--r-- | queries/haskell/injections.scm | 20 |
2 files changed, 31 insertions, 31 deletions
diff --git a/queries/haskell/highlights.scm b/queries/haskell/highlights.scm index 1a3cfd485..ce18f98a3 100644 --- a/queries/haskell/highlights.scm +++ b/queries/haskell/highlights.scm @@ -277,7 +277,7 @@ (pat_view (exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable (variable) @function.call) ])) @@ -293,14 +293,14 @@ ; partially applied infix functions (sections) also get highlighted as operators (exp_section_right [ - ((variable) @operator) + (variable) @operator (qualified_variable (variable) @operator) ]) (exp_section_left [ - ((variable) @operator) + (variable) @operator (qualified_variable (variable) @operator) ]) @@ -310,7 +310,7 @@ (exp_infix (exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable ((module) @module (variable) @function.call)) @@ -328,7 +328,7 @@ . (exp_name [ - ((variable) @variable) + (variable) @variable (qualified_variable (variable) @variable) ])) @@ -336,7 +336,7 @@ ; function calls with infix operators ((exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable (variable) @function.call) ]) @@ -353,7 +353,7 @@ . (exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable (variable) @function.call) ])) @@ -364,7 +364,7 @@ ; function composition, arrows, monadic composition (lhs) ((exp_name [ - ((variable) @function) + (variable) @function (qualified_variable (variable) @function) ]) @@ -381,7 +381,7 @@ . (exp_name [ - ((variable) @function) + (variable) @function (qualified_variable (variable) @function) ])) @@ -394,7 +394,7 @@ . (exp_name [ - ((variable) @function) + (variable) @function (qualified_variable (variable) @function) ]) @@ -415,7 +415,7 @@ (exp_apply (exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable (variable) @function.call) ])) @@ -428,7 +428,7 @@ (exp_infix (exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable (variable) @function.call) ]) @@ -444,7 +444,7 @@ . (exp_name [ - ((variable) @function.call) + (variable) @function.call (qualified_variable (variable) @function.call) ])))) @@ -455,7 +455,7 @@ . (exp_name [ - ((variable) @variable) + (variable) @variable (qualified_variable (variable) @variable) ])) @@ -493,9 +493,9 @@ ; signatures that have a function type ; + functions that follow them -((signature +(signature (variable) @function - (fun))) + (fun)) ((signature (variable) @_type @@ -505,10 +505,10 @@ (variable) @function) (#eq? @function @_type)) -((signature +(signature (variable) @function (context - (fun)))) + (fun))) ((signature (variable) @_type @@ -570,8 +570,8 @@ (quasiquote_body) @string) (quasiquote - ((_ - (variable) @_name)) + (_ + (variable) @_name) (#eq? @_name "qq") (quasiquote_body) @string) @@ -613,7 +613,7 @@ (exp_field field: [ - ((variable) @variable.member) + (variable) @variable.member (qualified_variable (variable) @variable.member) ]) diff --git a/queries/haskell/injections.scm b/queries/haskell/injections.scm index d1c8fe5fb..59fe73357 100644 --- a/queries/haskell/injections.scm +++ b/queries/haskell/injections.scm @@ -1,8 +1,8 @@ ; ----------------------------------------------------------------------------- ; General language injection (quasiquote - ((quoter) @injection.language) - ((quasiquote_body) @injection.content)) + (quoter) @injection.language + (quasiquote_body) @injection.content) ((comment) @injection.content (#set! injection.language "comment")) @@ -21,28 +21,28 @@ (quasiquote (quoter) @_name (#any-of? @_name "cassius" "lucius") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "css")) ; HTML: Text.Hamlet (quasiquote (quoter) @_name (#any-of? @_name "shamlet" "xshamlet" "hamlet" "xhamlet" "ihamlet") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "html")) ; JS: Text.Julius (quasiquote (quoter) @_name (#any-of? @_name "js" "julius") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "javascript")) ; TS: Text.TypeScript (quasiquote (quoter) @_name (#any-of? @_name "tsc" "tscJSX") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "typescript")) ; ----------------------------------------------------------------------------- @@ -50,7 +50,7 @@ (quasiquote (quoter) @_name (#eq? @_name "hsx") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "html")) ; ----------------------------------------------------------------------------- @@ -58,7 +58,7 @@ (quasiquote (quoter) @_name (#eq? @_name "aesonQQ") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "json")) ; ----------------------------------------------------------------------------- @@ -67,10 +67,10 @@ (quasiquote (quoter) @injection.language (#eq? @injection.language "sql") - ((quasiquote_body) @injection.content)) + (quasiquote_body) @injection.content) (quasiquote (quoter) @_name (#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith") - ((quasiquote_body) @injection.content) + (quasiquote_body) @injection.content (#set! injection.language "haskell_persistent")) |
