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
+1 -1
View File
@@ -2,7 +2,7 @@
Example of how to add a new language grammar: https://github.com/warpdotdev/warp-internal/pull/11501/files
## TSLanguage
We need a [TSLanguage(https://tree-sitter.github.io/tree-sitter/using-parsers#the-basic-objects) object to parse a source code file. We use open-source libraries that provide functions that create these objects. These functions are usually written in C but we can use them in Rust crates.
We need a [TSLanguage](https://tree-sitter.github.io/tree-sitter/using-parsers#the-basic-objects) object to parse a source code file. We use open-source libraries that provide functions that create these objects. These functions are usually written in C but we can use them in Rust crates.
## config.yaml
You can find this information on language specific documentation and style guides.
+13
View File
@@ -0,0 +1,13 @@
display_name: "jq"
indent_unit:
space: 2
comment_prefix: "#"
brackets:
- start: "{"
end: "}"
- start: "("
end: ")"
- start: "["
end: "]"
- start: "\""
end: "\""
+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