Change groups slightly
This commit is contained in:
parent
32a77b3a31
commit
2c17cea19e
15
kakrc.sample
15
kakrc.sample
|
@ -1,12 +1,13 @@
|
|||
# tree-sitter
|
||||
tree-always-highlight
|
||||
set-option global tree_highlight_style ",rgb:404040"
|
||||
declare-user-mode tree
|
||||
map global normal 't' ":enter-user-mode tree<ret>"
|
||||
map global normal '<tab>' ":enter-user-mode tree<ret>"
|
||||
map global normal 'T' ":enter-user-mode -lock tree<ret>"
|
||||
|
||||
map -docstring "select node" global tree 'n' ":tree-select-node<ret>"
|
||||
map -docstring "select parent" global tree 'k' ":tree-select-parent-node<ret>"
|
||||
# map -docstring "select children" global tree 'c' ":tree-select-children<ret>"
|
||||
map -docstring "select children" global tree 'C' ":tree-select-children<ret>"
|
||||
map -docstring "select children of type" global tree 'c' ":enter-user-mode tree-children<ret>"
|
||||
map -docstring "select next node of type" global tree 'l' ":enter-user-mode tree-next<ret>"
|
||||
|
@ -19,16 +20,22 @@ declare-user-mode tree-children
|
|||
declare-user-mode tree-next
|
||||
declare-user-mode tree-prev
|
||||
|
||||
map global normal 'f' ":enter-user-mode tree-next<ret>"
|
||||
map global normal 'F' ":enter-user-mode tree-children<ret>"
|
||||
|
||||
evaluate-commands %sh{
|
||||
echo "i,identifier
|
||||
f,function
|
||||
d,declaration
|
||||
t,type
|
||||
c,call
|
||||
a,arguments
|
||||
s,statement" |
|
||||
s,statement
|
||||
d,declaration
|
||||
n,number
|
||||
\",string" |
|
||||
while IFS=, read -r cmd group ; do
|
||||
echo "map -docstring '$group child' global tree-children '$cmd' ':tree-select-children $group<ret>'"
|
||||
echo "map -docstring 'next $group' global tree-next '$cmd' ':tree-select-next-node $group<ret>'"
|
||||
echo "map -docstring 'previous $group' global tree-prev '$cmd' ':tree-select-previous-node $group<ret>'"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[filetype.rust]
|
||||
group.identifier = ["identifier", "scoped_identifier"]
|
||||
group.function = ["function_item"]
|
||||
group.declaration = ["function_item", "struct_item", "enum_item"]
|
||||
group.declaration = ["const_item", "macro_invocation", "macro_definition", "empty_statement", "attribute_item", "inner_attribute_item", "mod_item", "foreign_mod_item", "struct_item", "union_item", "enum_item", "type_item", "function_item", "function_signature_item", "impl_item", "trait_item", "associated_type", "let_declaration", "use_declaration", "extern_crate_declaration", "static_item"]
|
||||
group.call = ["macro_invocation", "call_expression"]
|
||||
group.arguments = ["arguments", "token_tree"]
|
||||
group.statement = ["expression_statement", "let_declaration"]
|
||||
|
||||
group.string = ["string_literal", "raw_string_literal"]
|
||||
group.number = ["integer_literal", "float_literal", "negative_literal"]
|
||||
group.type = ["abstract_type", "reference_type", "metavariable", "pointer_type", "generic_type", "scoped_type_identifier", "tuple_type", "unit_type", "array_type", "function_type", "macro_invocation", "empty_type", "dynamic_type", "bounded_type", "primitive_type"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user