first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+11
View File
@@ -0,0 +1,11 @@
display_name: "Nix"
indent_unit:
space: 2
comment_prefix: "#"
brackets:
- start: "{"
end: "}"
- start: "("
end: ")"
- start: "["
end: "]"
@@ -0,0 +1,6 @@
(comment) @comment
; Nix has no named function or class declarations; the meaningful symbols are
; attribute bindings (`name = value;`) in attrsets and `let` blocks.
(binding
attrpath: (attrpath) @definition.binding)
+36
View File
@@ -0,0 +1,36 @@
; Adapted from Helix's runtime/queries/nix/indents.scm, reduced to the plain
; @indent / @outdent captures Warp's indent engine consumes.
; One level per bracketed scope; the matching close token dedents.
[
(attrset_expression)
(rec_attrset_expression)
(let_attrset_expression)
(list_expression)
(parenthesized_expression)
(formals)
] @indent
[
"}"
")"
"]"
] @outdent
; A binding value carried onto the line(s) after `=`. It shares the `=` line
; with a same-line bracket, so `x = { … }` is not indented twice.
(binding) @indent
; `let … in`: keep the bindings indented; pull the body back to the `let` level.
(let_expression) @indent
(let_expression body: (_) @outdent)
; `if … then … else`: indent each branch.
(if_expression
consequence: (_) @indent)
(if_expression
alternative: (_) @indent)
; Function application: arguments carried onto following lines. Nested
; applications share a line, so they collapse to a single level.
(apply_expression) @indent