@@ -67,6 +67,7 @@ Contents
6767 - [ Diagnostic Display] ( #diagnostic-display )
6868 - [ Diagnostic Highlighting Groups] ( #diagnostic-highlighting-groups )
6969 - [ Symbol Search] ( #symbol-search )
70+ - [ Type/Call Hierarchy] ( #typecall-hierarchy )
7071- [ Commands] ( #commands )
7172 - [ YcmCompleter subcommands] ( #ycmcompleter-subcommands )
7273 - [ GoTo Commands] ( #goto-commands )
@@ -677,6 +678,8 @@ Quick Feature Summary
677678* Code formatting (` Format ` )
678679* Semantic highlighting
679680* Inlay hints
681+ * Type hierarchy
682+ * Call hierarchy
680683
681684### C♯
682685
@@ -720,6 +723,8 @@ Quick Feature Summary
720723* Type information for identifiers (` GetType ` )
721724* Code formatting (` Format ` )
722725* Management of ` gopls ` server instance
726+ * Inlay hints
727+ * Call hierarchy
723728
724729### JavaScript and TypeScript
725730
@@ -741,6 +746,7 @@ Quick Feature Summary
741746* Organize imports (` OrganizeImports ` )
742747* Management of ` TSServer ` server instance
743748* Inlay hints
749+ * Call hierarchy
744750
745751### Rust
746752
@@ -759,6 +765,7 @@ Quick Feature Summary
759765* Management of ` rust-analyzer ` server instance
760766* Semantic highlighting
761767* Inlay hints
768+ * Call hierarchy
762769
763770### Java
764771
@@ -782,6 +789,9 @@ Quick Feature Summary
782789* Execute custom server command (` ExecuteCommand <args> ` )
783790* Management of ` jdt.ls ` server instance
784791* Semantic highlighting
792+ * Inlay hints
793+ * Type hierarchy
794+ * Call hierarchy
785795
786796User Guide
787797----------
@@ -913,10 +923,6 @@ Ctrl-l is not a suggestion, just an example.
913923
914924### Semantic highlighting
915925
916- ** NOTE** : This feature is highly experimental and offered in the hope that it is
917- useful. It shall not be considered stable; if you find issues with it, feel free
918- to report them, however.
919-
920926Semantic highlighting is the process where the buffer text is coloured according
921927to the underlying semantic type of the word, rather than classic syntax
922928highlighting based on regular expressions. This can be powerful additional data
@@ -1883,6 +1889,61 @@ so you can use window commands `<C-w>...` for example.
18831889for that, or use a window command (e.g. `< Ctrl- w> j` ) or the mouse to leave the
18841890prompt buffer window.
18851891
1892+ # ## Type/Call Hierarchy
1893+
1894+ ** * This feature requires Vim and is not supported in Neovim***
1895+
1896+ ** NOTE ** : This feature is highly experimental and offered in the hope that it is
1897+ useful. Please help us by reporting issues and offering feedback.
1898+
1899+ YCM provides a way to view and navigate hierarchies. The following hierarchies
1900+ are supported:
1901+
1902+ * Type hierachy `< Plug> (YCMTypeHierarchy)` : Display subtypes and supertypes
1903+ of the symbol under cursor. Expand down to subtypes and up to supertypes.
1904+ * Call hierarchy `< Plug> (YCMCallHierarchy)` : Display callees and callers of
1905+ the symbol under cursor. Expand down to callers and up to callees.
1906+
1907+ Take a look at this [](https:// asciinema.org/ a/ 659925 )
1908+ for brief demo.
1909+
1910+ Hierarchy UI can be initiated by mapping something to the indicated plug
1911+ mappings, for example:
1912+
1913+ ```viml
1914+ nmap < leader> yth < Plug> (YCMTypeHierarchy)
1915+ nmap < leader> ych < Plug> (YCMCallHierarchy)
1916+ ```
1917+
1918+ This opens a " modal" popup showing the current element in the hierarchy tree.
1919+ The current tree root is aligned to the left and child and parent nodes are
1920+ expanded to the right. Expand the tree " down" with `< Tab> and " up" with
1921+ `< S- Tab> ` .
1922+
1923+ The " root" of the tree can be re- focused to the selected item with
1924+ `< S- Tab> ` and further `< S- Tab> ` will show the parents of the selected item. This
1925+ can take a little getting used to, but it' s particularly important with multiple
1926+ inheritance where a " child" of the current root may actually have other,
1927+ invisible, parent links. `< S- Tab> ` on that row will show these by setting the
1928+ display root to the selected item.
1929+
1930+ When the hierarchy is displayed, the following keys are intercepted:
1931+
1932+ * `< Tab> ` : Drill into the hierarchy at the selected item: expand and show
1933+ children of the selected item.
1934+ * `< S- Tab> ` : Show parents of the selected item. When applied to sub- types, this
1935+ will re- root the tree at that type , so that all parent types (are displayed).
1936+ Similar for callers.
1937+ * `< CR > ` : Jump to the symbol currently selected.
1938+ * `< Down> ` , `< C- n> ` , `< C- j> ` , `j` : Select the next item
1939+ * `< Up> ` , `< C- p> ` , `< C- k> ` , `k` ; Select the previous item
1940+ * Any other key: closes the popup without jumping to any location
1941+
1942+ ** Note:** you might think the call hierarchy tree is inverted, but we think
1943+ this way round is more intuitive because this is the typical way that call
1944+ stacks are displayed (with the current function at the top, and its callers
1945+ below).
1946+
18861947Commands
18871948--------
18881949
@@ -2102,6 +2163,9 @@ Supported in filetypes: `c, cpp, objc, objcpp, cuda, go, java, rust`
21022163
21032164# ### The `GoToCallers` and `GoToCallees` subcommands
21042165
2166+ Note: A much more powerful call and type hierarchy can be viewd interactively.
2167+ See [interactive type and call hierarchy](# interactive-type-and-call-hierarchy).
2168+
21052169Populate the quickfix list with the callers, or callees respectively, of the
21062170function associated with the current cursor position. The semantics of this
21072171differ depending on the filetype and language server.
@@ -3738,9 +3802,7 @@ let g:ycm_language_server = []
37383802# ## The `g:ycm_disable_signature_help` option
37393803
37403804This option allows you to disable all signature help for all completion engines.
3741- There is no way to disable it per- completer. This option is _reserved_, meaning
3742- that while signature help support remains experimental, its values and meaning
3743- may change and it may be removed in a future version.
3805+ There is no way to disable it per- completer.
37443806
37453807Default: `0 `
37463808
0 commit comments