aboutsummaryrefslogtreecommitdiffstats
path: root/queries/lua
diff options
context:
space:
mode:
authorkiyan42 <yazdani.kiyan@protonmail.com>2020-10-13 23:55:37 +0200
committerKiyan Yazdani <yazdani.kiyan@protonmail.com>2020-10-19 21:08:15 +0200
commit1735528db5866d4ccdf117fb7f4c7fd2b724e4db (patch)
treef7b20f610547eb54dd8a217658b006bc8040b405 /queries/lua
parentstart indent module (diff)
downloadnvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.tar
nvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.tar.gz
nvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.tar.bz2
nvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.tar.lz
nvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.tar.xz
nvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.tar.zst
nvim-treesitter-1735528db5866d4ccdf117fb7f4c7fd2b724e4db.zip
Treesitter indent
also fixes the memoize_by_buf_tick function
Diffstat (limited to 'queries/lua')
-rw-r--r--queries/lua/indents.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/queries/lua/indents.scm b/queries/lua/indents.scm
new file mode 100644
index 000000000..e59b68085
--- /dev/null
+++ b/queries/lua/indents.scm
@@ -0,0 +1,23 @@
+[
+ (function_definition)
+ (local_function)
+ (function)
+ (if_statement)
+ (for_statement)
+ (for_in_statement)
+ (repeat_statement)
+ (while_statement)
+ (table)
+ (arguments)
+] @indent
+
+[
+ "end"
+ "{"
+ "}"
+ "("
+ ")"
+ "then"
+ (else)
+ (elseif)
+] @branch