aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/query
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-02-21 01:47:09 -0800
committerGitHub <noreply@github.com>2024-02-21 18:47:09 +0900
commit455f6586bae558f99b51c0b07d46adc736f3822c (patch)
treea2f5091bd44cc51794c85dd0d86846bd8398d9f4 /tests/indent/query
parenthighlights(slang): add support for `where` (diff)
downloadnvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.tar
nvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.tar.gz
nvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.tar.bz2
nvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.tar.lz
nvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.tar.xz
nvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.tar.zst
nvim-treesitter-455f6586bae558f99b51c0b07d46adc736f3822c.zip
feat(query): indents that reflect the formatter (#6154)
* feat(query): indents that reflect the formatter Indentation queries that reflect the query formatter. Only applicable if `lispoptions=expr:1`
Diffstat (limited to 'tests/indent/query')
-rw-r--r--tests/indent/query/test.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/indent/query/test.scm b/tests/indent/query/test.scm
new file mode 100644
index 000000000..62b94417c
--- /dev/null
+++ b/tests/indent/query/test.scm
@@ -0,0 +1,41 @@
+; vim:ft=query
+; format-ignore
+(fenced_code_block (fenced_code_block_delimiter) @label
+ (info_string
+ (language) @_lang)
+ (#offset! @label 0 1 0 -1)
+ (#ft-conceal! @_lang))
+
+([
+ (list_marker_minus)
+ (list_marker_plus)
+ (list_marker_star)
+] @markup.list
+ (#offset-first-n! @markup.list 1)
+ (#set! conceal "•"))
+
+(list
+ (list_item
+ (list
+ (list_item
+ ([
+ (list_marker_minus)
+ (list_marker_plus)
+ (list_marker_star)
+ ] @markup.list
+ (#offset-first-n! @markup.list 1)
+ (#set! conceal "◦"))))))
+
+; comment
+(while_statement
+ [
+ "while"
+ "do"
+ ] @open.loop
+ "end" @close.loop) @scope.loop
+
+[
+ "toplevel"
+ "list"
+] @variable
+((