@@ -67,6 +67,7 @@ Contents
67
67
- [ Diagnostic Display] ( #diagnostic-display )
68
68
- [ Diagnostic Highlighting Groups] ( #diagnostic-highlighting-groups )
69
69
- [ Symbol Search] ( #symbol-search )
70
+ - [ Type/Call Hierarchy] ( #typecall-hierarchy )
70
71
- [ Commands] ( #commands )
71
72
- [ YcmCompleter subcommands] ( #ycmcompleter-subcommands )
72
73
- [ GoTo Commands] ( #goto-commands )
@@ -677,6 +678,8 @@ Quick Feature Summary
677
678
* Code formatting (` Format ` )
678
679
* Semantic highlighting
679
680
* Inlay hints
681
+ * Type hierarchy
682
+ * Call hierarchy
680
683
681
684
### C♯
682
685
@@ -720,6 +723,8 @@ Quick Feature Summary
720
723
* Type information for identifiers (` GetType ` )
721
724
* Code formatting (` Format ` )
722
725
* Management of ` gopls ` server instance
726
+ * Inlay hints
727
+ * Call hierarchy
723
728
724
729
### JavaScript and TypeScript
725
730
@@ -741,6 +746,7 @@ Quick Feature Summary
741
746
* Organize imports (` OrganizeImports ` )
742
747
* Management of ` TSServer ` server instance
743
748
* Inlay hints
749
+ * Call hierarchy
744
750
745
751
### Rust
746
752
@@ -759,6 +765,7 @@ Quick Feature Summary
759
765
* Management of ` rust-analyzer ` server instance
760
766
* Semantic highlighting
761
767
* Inlay hints
768
+ * Call hierarchy
762
769
763
770
### Java
764
771
@@ -782,6 +789,9 @@ Quick Feature Summary
782
789
* Execute custom server command (` ExecuteCommand <args> ` )
783
790
* Management of ` jdt.ls ` server instance
784
791
* Semantic highlighting
792
+ * Inlay hints
793
+ * Type hierarchy
794
+ * Call hierarchy
785
795
786
796
User Guide
787
797
----------
@@ -913,10 +923,6 @@ Ctrl-l is not a suggestion, just an example.
913
923
914
924
### Semantic highlighting
915
925
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
-
920
926
Semantic highlighting is the process where the buffer text is coloured according
921
927
to the underlying semantic type of the word, rather than classic syntax
922
928
highlighting based on regular expressions. This can be powerful additional data
@@ -1883,6 +1889,61 @@ so you can use window commands `<C-w>...` for example.
1883
1889
for that, or use a window command (e.g. `< Ctrl- w> j` ) or the mouse to leave the
1884
1890
prompt buffer window.
1885
1891
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
+
1886
1947
Commands
1887
1948
--------
1888
1949
@@ -2102,6 +2163,9 @@ Supported in filetypes: `c, cpp, objc, objcpp, cuda, go, java, rust`
2102
2163
2103
2164
# ### The `GoToCallers` and `GoToCallees` subcommands
2104
2165
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
+
2105
2169
Populate the quickfix list with the callers, or callees respectively, of the
2106
2170
function associated with the current cursor position. The semantics of this
2107
2171
differ depending on the filetype and language server.
@@ -3738,9 +3802,7 @@ let g:ycm_language_server = []
3738
3802
# ## The `g:ycm_disable_signature_help` option
3739
3803
3740
3804
This 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.
3744
3806
3745
3807
Default: `0 `
3746
3808
0 commit comments