You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/search/code-navigation.mdx
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,36 @@ import SearchContextSchema from '/snippets/schemas/v3/searchContext.schema.mdx'
9
9
This feature is only available with an active Enterprise license. Please add your [license key](/self-hosting/license-key) to activate it.
10
10
</Note>
11
11
12
-
**Code navigation** allows you to jump between symbol definition and references when viewing source files in Sourcebot.
12
+
**Code navigation** allows you to jump between symbol definition and references when viewing source files in Sourcebot. This feature is enabled **automatically** when a valid license key is present and works with all popular programming languages.
|**Hover popover**| Hovering over a symbol reveals the symbol's definition signature as a inline preview. |
22
+
|**Go to definition**| Clicking the "go to definition" button in the popover or clicking the symbol name navigates to the symbol's definition. |
23
+
|**Find references**| Clicking the "find all references" button in the popover lists all references in the explore panel. |
24
+
|**Explore panel**| Lists all references and definitions for the symbol selected in the popover. |
25
+
26
+
## How does it work?
27
+
28
+
Code navigation is **search-based**, meaning it uses the same code search engine and [query language](/docs/search/syntax-reference) to estimate a symbol's references and definitions. We refer to these estimations as "search heuristics". We have two search heuristics to enable the following operations:
29
+
30
+
### Find references
31
+
Given a `symbolName`, along with information about the file the symbol is contained within (`git_revision`, and `language`), runs the following search:
Given a `symbolName`, along with information about the file the symbol is contained within (`git_revision`, and `language`), runs the following search:
Note that the `sym:` prefix is used to filter the search by symbol definitions. These are created at index time by [universal ctags](https://ctags.io/).
0 commit comments