mirror of
https://github.com/kristoferssolo/tree-sitter-bruno.git
synced 2025-10-21 20:10:34 +00:00
feat(queries): add tags and folds
This commit is contained in:
parent
9a923cded1
commit
7c5ea5ae6a
4
bindings/python/tree_sitter_bruno/__init__.py
generated
4
bindings/python/tree_sitter_bruno/__init__.py
generated
@ -20,8 +20,8 @@ def __getattr__(name):
|
||||
return _get_query("INJECTIONS_QUERY", "injections.scm")
|
||||
# if name == "LOCALS_QUERY":
|
||||
# return _get_query("LOCALS_QUERY", "locals.scm")
|
||||
# if name == "TAGS_QUERY":
|
||||
# return _get_query("TAGS_QUERY", "tags.scm")
|
||||
if name == "TAGS_QUERY":
|
||||
return _get_query("TAGS_QUERY", "tags.scm")
|
||||
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
||||
|
||||
2
bindings/python/tree_sitter_bruno/__init__.pyi
generated
2
bindings/python/tree_sitter_bruno/__init__.pyi
generated
@ -5,6 +5,6 @@ from typing import Final
|
||||
HIGHLIGHTS_QUERY: Final[str]
|
||||
INJECTIONS_QUERY: Final[str]
|
||||
# LOCALS_QUERY: Final[str]
|
||||
# TAGS_QUERY: Final[str]
|
||||
TAGS_QUERY: Final[str]
|
||||
|
||||
def language() -> object: ...
|
||||
|
||||
2
bindings/rust/lib.rs
generated
2
bindings/rust/lib.rs
generated
@ -39,7 +39,7 @@ pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");
|
||||
pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm");
|
||||
pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm");
|
||||
// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm");
|
||||
// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm");
|
||||
pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm");
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
3
queries/folds.scm
Normal file
3
queries/folds.scm
Normal file
@ -0,0 +1,3 @@
|
||||
(dictionary) @fold
|
||||
(array) @fold
|
||||
(textblock) @fold
|
||||
@ -1,5 +1,4 @@
|
||||
(keyword) @keyword
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
|
||||
12
queries/tags.scm
Normal file
12
queries/tags.scm
Normal file
@ -0,0 +1,12 @@
|
||||
(source_file) @tag.root
|
||||
|
||||
(meta) @tag.meta
|
||||
(http) @tag.http
|
||||
(query) @tag.query
|
||||
(headers) @tag.headers
|
||||
(auths) @tag.auths
|
||||
(bodies) @tag.bodies
|
||||
(varsandassert) @tag.varsandassert
|
||||
(script) @tag.script
|
||||
(tests) @tag.tests
|
||||
(docs) @tag.docs
|
||||
@ -14,6 +14,12 @@
|
||||
],
|
||||
"injections": [
|
||||
"queries/injections.scm"
|
||||
],
|
||||
"tags": [
|
||||
"queries/tags.scm"
|
||||
],
|
||||
"folds": [
|
||||
"queries/folds.scm"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user