aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/python/indents.scm_
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-07-01 10:16:16 +0000
committerBlaž Hrastnik2022-07-01 10:17:19 +0000
commit9ae70cc410bd042b5cf119c571db323436caf08b (patch)
treef4c3966d49187dd011d5491251cde52881d36bba /runtime/queries/python/indents.scm_
parentd8abd1eaf398f462122efbc937cda9d8178a5754 (diff)
Disable tree-sitter python indents, use fallback for now
There's been a lot of complaints about the state of python indentation and the fallback actually works better until the solution proposed in https://github.com/helix-editor/helix/issues/763#issuecomment-1137894973= is implemented.
Diffstat (limited to 'runtime/queries/python/indents.scm_')
-rw-r--r--runtime/queries/python/indents.scm_38
1 files changed, 38 insertions, 0 deletions
diff --git a/runtime/queries/python/indents.scm_ b/runtime/queries/python/indents.scm_
new file mode 100644
index 00000000..810ff52f
--- /dev/null
+++ b/runtime/queries/python/indents.scm_
@@ -0,0 +1,38 @@
+[
+ (list)
+ (tuple)
+ (dictionary)
+ (set)
+
+ (if_statement)
+ (for_statement)
+ (while_statement)
+ (with_statement)
+ (try_statement)
+ (import_from_statement)
+
+ (parenthesized_expression)
+ (generator_expression)
+ (list_comprehension)
+ (set_comprehension)
+ (dictionary_comprehension)
+
+ (tuple_pattern)
+ (list_pattern)
+ (argument_list)
+ (parameters)
+ (binary_operator)
+
+ (function_definition)
+ (class_definition)
+] @indent
+
+[
+ ")"
+ "]"
+ "}"
+ (return_statement)
+ (pass_statement)
+ (raise_statement)
+] @outdent
+