From 0e8ea13696206aa8ad289d539a5df62f34a73dec Mon Sep 17 00:00:00 2001 From: Ollie Charles Date: Sat, 10 Dec 2022 20:03:18 +0000 Subject: [PATCH] Add Haskell text objects (#5061) --- book/src/generated/lang-support.md | 2 +- runtime/queries/haskell/textobjects.scm | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/haskell/textobjects.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 28dafd7ad..4dca81047 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -51,7 +51,7 @@ | gowork | ✓ | | | `gopls` | | graphql | ✓ | | | | | hare | ✓ | | | | -| haskell | ✓ | | | `haskell-language-server-wrapper` | +| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` | | hcl | ✓ | | ✓ | `terraform-ls` | | heex | ✓ | ✓ | | `elixir-ls` | | html | ✓ | | | `vscode-html-language-server` | diff --git a/runtime/queries/haskell/textobjects.scm b/runtime/queries/haskell/textobjects.scm new file mode 100644 index 000000000..9870dc4a4 --- /dev/null +++ b/runtime/queries/haskell/textobjects.scm @@ -0,0 +1,13 @@ +(comment) @comment.inside + +[ + (adt) + (decl_type) + (newtype) +] @class.around + +((signature)? (function rhs:(_) @function.inside)) @function.around +(exp_lambda) @function.around + +(adt (type_variable) @parameter.inside) +(patterns (_) @parameter.inside)