This article explains how the Cursor IDE indexes a codebase, focusing on its approach to understanding code structure and relationships beyond simple text indexing. It details the use of Language Server Protocol (LSP) and the creation of a graph database to represent the codebase, enabling features like code navigation, refactoring, and accurate code completion.