diff --git a/dotfiles/kakrc b/dotfiles/kakrc index 71a0237a..af59bb7b 100644 --- a/dotfiles/kakrc +++ b/dotfiles/kakrc @@ -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" +map global normal '' ":enter-user-mode tree" map global normal 'T' ":enter-user-mode -lock tree" -map -docstring "select node" global tree 'n' ":tree-select-node" -map -docstring "select parent" global tree 'k' ":tree-select-parent-node" -# map -docstring "select children" global tree 'c' ":tree-select-children" -map -docstring "select children" global tree 'C' ":tree-select-children" +map -docstring "select node" global tree 'n' ":tree-select-node" +map -docstring "select parent" global tree 'k' ":tree-select-parent-node" +map -docstring "select children" global tree 'C' ":tree-select-children" map -docstring "select children of type" global tree 'c' ":enter-user-mode tree-children" -map -docstring "select next node of type" global tree 'l' ":enter-user-mode tree-next" -map -docstring "select previous node of type" global tree 'h' ":enter-user-mode tree-prev" -map -docstring "show sexp" global tree 's' ":tree-node-sexp" -map -docstring "enable highlighting" global tree '"' ":tree-always-highlight" -map -docstring "disable highlighting" global tree '&' ":tree-always-highlight-disable" +map -docstring "select next node of type" global tree 'l' ":enter-user-mode tree-next" +map -docstring "select previous node of type" global tree 'h' ":enter-user-mode tree-prev" +map -docstring "show sexp" global tree 's' ":tree-node-sexp" +map -docstring "enable highlighting" global tree '"' ":tree-always-highlight" +map -docstring "disable highlighting" global tree '&' ":tree-always-highlight-disable" declare-user-mode tree-children declare-user-mode tree-next declare-user-mode tree-prev +map global normal 'f' ":enter-user-mode tree-next" +map global normal 'F' ":enter-user-mode tree-children" + 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'" echo "map -docstring 'next $group' global tree-next '$cmd' ':tree-select-next-node $group'" @@ -118,6 +123,7 @@ while IFS=, read -r cmd group ; do done } + #TODO # map global user '&' ':qhl-word' -docstring "Highlight current word" # map global user '"' ':unqhl' -docstring "Remove highlight" diff --git a/flake.lock b/flake.lock index 06acf81b..722f2760 100644 --- a/flake.lock +++ b/flake.lock @@ -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" },