Skip to content

Code Navigation Guide

Navigate your codebase efficiently with IfAI's intelligent code navigation.

Go to Definition

Jump to where symbols are defined in your code.

Keyboard Shortcuts

ActionmacOSWindows/Linux
Go to DefinitionF12 or Cmd+ClickF12 or Ctrl+Click

What It Does

  • Functions: Jumps to function definition
  • Classes: Goes to class/struct definition
  • Variables: Shows where variable is declared
  • Types: Opens type/interface definition
  • Imports: Opens imported module/file

Usage

  1. Place cursor on any symbol
  2. Press F12 or Cmd+Click
  3. Editor navigates to definition

Example:

typescript
// Cursor on 'calculateTotal'
const result = calculateTotal(items);  // <- Press F12 here

// Navigates to:
function calculateTotal(items: Item[]) {
  return items.reduce((sum, item) => sum + item.price, 0);
}

Find References

Find all places where a symbol is used.

Keyboard Shortcuts

ActionmacOSWindows/Linux
Find ReferencesShift+F12Shift+F12

What It Shows

  • All usages of the symbol
  • Grouped by file
  • Shows read vs write references
  • Display count of occurrences

Usage

  1. Place cursor on any symbol
  2. Press Shift+F12
  3. Results panel shows all references

Example:

typescript
function getUser(id: string) {  // <- Shift+F12 here
  return users[id];
}

// Results show:
// - user.service.ts:15 - Called in 'loadUser'
// - user.service.ts:23 - Called in 'refreshUser'
// - user.test.ts:5 - Referenced in test

Search for symbols across your entire project.

Keyboard Shortcuts

ActionmacOSWindows/Linux
Symbol SearchCmd+Shift+OCtrl+Shift+O

Search Types

  • All Symbols: Search functions, classes, variables
  • Functions Only: Type @ to filter
  • Classes Only: Type # to filter

Usage

  1. Press Cmd+Shift+O
  2. Type symbol name (fuzzy search)
  3. Use @ or # prefixes to filter
  4. Press Enter to navigate

Example:

Type: "usr"
Matches:
  - getUser
  - userService
  - username

Supported Languages

IfAI's code navigation works with 35+ languages:

Fully Supported

LanguageStatus
TypeScript✅ Full
JavaScript✅ Full
Python✅ Full
Rust✅ Full
Go✅ Full
Java✅ Full
C/C++✅ Full
C#✅ Full
PHP✅ Full
Ruby✅ Full
Swift✅ Full
Kotlin✅ Full
Dart✅ Full
Lua✅ Full
Scala✅ Full
... and more!

Partial Support

  • HTML/XML
  • CSS/SCSS
  • JSON/YAML
  • Markdown
  • Shell scripts

Symbol Indexing

How It Works

  1. Automatic Indexing: Files are indexed when opened
  2. Background Updates: Index updates as you edit
  3. Project-Wide: All files in project are indexed
  4. Language Aware: Uses Tree-sitter for accurate parsing

Checking Index Status

Look at the status bar:

✓ Indexed 245 files, 3,420 symbols

Rebuilding Index

If navigation seems off:

  1. Cmd+Shift+P > "Rebuild Symbol Index"
  2. Wait for indexing to complete
  3. Try navigation again

Tips and Tricks

1. Peek Definition

See definition without leaving current location:

macOS: Cmd+Shift+F12Windows/Linux: Ctrl+Shift+F12

2. Back/Forward Navigation

Navigate through history:

Back: Ctrl+- (Cmd+- on Mac) Forward: Ctrl+Shift+- (Cmd+Shift+- on Mac)

3. Go to Line

Jump to specific line:

macOS: Ctrl+GWindows/Linux: Ctrl+G

4. Go to Symbol in File

Search within current file:

macOS: Cmd+Shift+OWindows/Linux: Ctrl+Shift+O

5. Multi-Definition

For ambiguous symbols:

  • Use Peek References first
  • Select the correct one
  • Navigate from there

Troubleshooting

"Definition not found"

Causes:

  • Symbol not in indexed files
  • Dynamic language limitations
  • File not saved

Solutions:

  1. Save the file
  2. Wait for indexing to complete
  3. Check if symbol is in indexed project

"No references found"

Causes:

  • Symbol is only defined, never used
  • References in non-indexed files

Solutions:

  1. Verify symbol is actually used
  2. Check project indexing scope
  3. Rebuild symbol index

Solutions:

  1. Reduce project size
  2. Exclude unnecessary folders (Settings > Project)
  3. Close unused files
  4. Use more specific search terms

Next Steps

Released under the MIT License.