Skip to main content
Powerful code navigation system that allows you to quickly locate and browse code in large projects, with support for cross-file analysis and intelligent reference finding.

Go to Definition

Quickly navigate to where symbols are defined.
F12 or Cmd/Ctrl + ClickPosition your cursor on any variable, function, class, or type and press F12 to jump to its definition.
local utils = require("utils.string")

-- Press F12 on 'formatName' to jump to definition
local result = utils.formatName("john")

Special Navigation Features

Navigate to module files from require statements:
-- Click or F12 on the string to open the module file
local parser = require("lib.parser")
local utils = require("utils/string")
Supports:
  • Dot notation: require("lib.parser")
  • Slash notation: require("lib/parser")
  • Relative paths: require("./local_module")
Navigate to files from path strings:
-- F12 on the path string opens the file
local config_path = "./config/settings.lua"
local data = loadfile("../data/users.dat")
Navigate from EmmyLua @see tags:
---@see utils.formatString For string formatting
---@see User User class definition
local function processData()
    -- F12 on the @see reference navigates to target
end
Navigate to overloaded function definitions:
---@overload fun(name: string): User
---@overload fun(id: number): User
---@param identifier string|number
---@return User
local function getUser(identifier)
    -- F12 on @overload tag shows all overload definitions
end

Find References

Locate all places where a symbol is used.
Shift + F12 or right-click → Find All References
---@class User
local User = {}

function User:new(name)
    -- Find all references to 'User' class
end
Shows:
  • All usages in current file
  • All usages across workspace
  • Grouped by file
  • Preview of surrounding code
Reference finding supports cross-file analysis and can accurately identify dependencies between modules.

Document Symbols

Structured view of symbols in the current file.

Access Methods

Outline Panel

View in the left sidebar for hierarchical navigation

Quick Open

Press Ctrl/Cmd + Shift + O for quick symbol search

Symbol Types

-- Functions
local function processData() end

-- Classes
---@class Vehicle
local Vehicle = {}

-- Methods
function Vehicle:start() end

-- Fields
Vehicle.speed = 0

-- Variables
local count = 0

-- Constants
local MAX_SIZE = 100
All of these are shown in the document symbols view with:
  • Hierarchical structure
  • Type information
  • Scope indicators
  • Icon differentiation

Real-time Filtering

Ctrl+Shift+O → Type 'proc' → Instantly shows 'processData'
Features:
  • Fuzzy matching
  • Instant results
  • Type-ahead filtering
Global symbol search across your entire workspace.
Ctrl/Cmd + T - Open workspace symbol searchType symbol name or prefix with @ for symbol-only search:
@User → Find all User classes
@process → Find all symbols containing 'process'
formatString → Find formatString function

Semantic Highlighting

Advanced syntax highlighting based on LSP semantic tokens.

Token Analysis

  • Variable types (local, global, parameter)
  • Function definitions and calls
  • Lua keywords
  • Documentation comments

Visual Distinction

  • Type-based colors
  • Scope depth indication
  • Error highlighting (red)
  • Warning highlighting (yellow)

Enhanced Rendering

local mutable_var = 10    -- Mutable: underlined
local const_value = 42    -- Constant: normal display

---@type string
local typed_var = "text"  -- Type-aware coloring
Features:
  • Mutable variable underlining
  • Type-based coloring
  • Real-time updates
  • Scope-aware highlighting

Inlay Hints

Display useful type and status information inline without mouse hovering.
function greet(name, age, active)
          -- ^string ^number ^boolean
    print(name .. " is " .. age)
end
Shows parameter types inline for better readability.

Configuration

{
  "inlayHints": {
    "enable": true,
    "paramHint": true,
    "indexHint": true,
    "localHint": false,
    "overrideHint": true
  }
}

Document Highlighting

Highlight all occurrences of the symbol under the cursor.
local function calculate(value)
    --                   ^^^^^ selected
    local result = value * 2
    --             ^^^^^ highlighted
    return value + result
    --     ^^^^^ highlighted
end
Features:
  • Highlights all uses of same variable
  • Shows effective scope
  • Real-time updates on cursor move
1

Use Keyboard Shortcuts

Master the key combinations for faster navigation:
  • F12 - Go to Definition
  • Shift + F12 - Find References
  • Ctrl/Cmd + Shift + O - Document Symbols
  • Ctrl/Cmd + T - Workspace Symbols
2

Leverage Peek Features

Use Peek Definition (Alt + F12) to view code without losing context.
3

Annotate Your Code

Add EmmyLua annotations for better navigation accuracy:
---@class Config
---@field timeout number
---@field retries number
local Config = {}
4

Use Breadcrumbs

Enable breadcrumbs in your editor for hierarchical navigation context.
All navigation features support cross-file analysis and can accurately identify dependencies between modules.

Build docs developers (and LLMs) love