Update kak-tree and config

This commit is contained in:
xenia 2023-11-13 09:48:08 +01:00
parent f52f28b84e
commit 0ddfd25c7b
2 changed files with 22 additions and 16 deletions

View File

@ -87,30 +87,35 @@ 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 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 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>"
map -docstring "select previous node of type" global tree 'h' ":enter-user-mode tree-prev<ret>"
map -docstring "show sexp" global tree 's' ":tree-node-sexp<ret>"
map -docstring "enable highlighting" global tree '"' ":tree-always-highlight<ret>"
map -docstring "disable highlighting" global tree '&' ":tree-always-highlight-disable<ret>"
map -docstring "select next node of type" global tree 'l' ":enter-user-mode tree-next<ret>"
map -docstring "select previous node of type" global tree 'h' ":enter-user-mode tree-prev<ret>"
map -docstring "show sexp" global tree 's' ":tree-node-sexp<ret>"
map -docstring "enable highlighting" global tree '"' ":tree-always-highlight<ret>"
map -docstring "disable highlighting" global tree '&' ":tree-always-highlight-disable<ret>"
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>'"
@ -118,6 +123,7 @@ while IFS=, read -r cmd group ; do
done
}
#TODO
# map global user '&' ':qhl-word<ret>' -docstring "Highlight current word"
# map global user '"' ':unqhl<ret>' -docstring "Remove highlight"

View File

@ -333,11 +333,11 @@
"tree-sitters": "tree-sitters"
},
"locked": {
"lastModified": 1699826096,
"narHash": "sha256-cLD24AUAc/vqWIty1bxA7q2qc8AWEwyCrdsOk0glKKI=",
"lastModified": 1699828151,
"narHash": "sha256-JI+tkQbzm1u3CYrPWNRHZupQx8rk8BpdeyAFDD6cNvY=",
"ref": "refs/heads/main",
"rev": "6e6ad7a82b0dc4142f4db2c06a0a80f1c1ca151a",
"revCount": 11,
"rev": "2c17cea19ee8d2b93f48e619b59912b1e5dc0ca0",
"revCount": 14,
"type": "git",
"url": "https://githug.xyz/xenia/kak-tree.git"
},