@@ -71,7 +71,6 @@ Calltree exports several commands for manipulating the calltree UI.
7171 *:CTClose*
7272:CTClose
7373 Closes the calltree window
74-
7574
7675 *:CTExpand*
7776:CTExpand
@@ -82,20 +81,40 @@ Calltree exports several commands for manipulating the calltree UI.
8281:CTCollapse
8382 Collapses a calltree symbol and its subtree.
8483
85- *:CTFocus*
84+ *:CTFocus*
8685:CTFocus
8786 Create a new calltree with the symbol under the cursor as root.
8887
8988 *:CTJump*
9089:CTJump
9190 Jump to the symbol's definition.
9291 How this jump is done is controlled via config.
92+
93+ *:CTSwitch*
94+ :CTSwitch
95+ Focus the symbol under the cursor and switch the calltree's
96+ direction.
97+
98+ For example, if your currently viewing incoming calls for symbol
99+ Func1 and perform a CTSwtch, Func1 will become root and the calltree
100+ will show outgoing calls for this symbol.
101+
102+ The typical use case is calling CTSwitch on the root symbol, turning
103+ the current outgoing calltree to an incoming call tree (or vice versa).
93104
94105 *:CTHover*
95106:CTHover
96107 Show hover info for the symbol
97108
109+ *:CTClearHL*
110+ :CTClearHL
111+ Clears any highlights after jumping to location.
112+
113+ Highlights are also clearned when the current Calltree window
114+ is closed.
115+
98116 *:CTDumpTree*
117+
99118:CTDumpTree
100119 Echos the current calltree in lua dictonary syntax.
101120 Useful for debugging.
@@ -148,4 +167,9 @@ The config table is described below:
148167 -- "nerd" - Use Nerd font icon set for symbol types (requires patched font)
149168 -- "codicon" - Use VSCode codicon icon set for symbol types (requires patched font)
150169 icons = "none"
170+ -- the highlight group used for highlighting the symbol being jumped too.
171+ symbol_hl = "Search",
172+ -- the highlight group used for highlighting the references to the symbol
173+ -- being jumped to.
174+ symbol_refs_hl = "Search"
151175 }
0 commit comments