• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

Server starts but does not know project root or capabilities — how do they handshake?

Formal Definition

Per Wikipedia: “Initialization is the initialize/initialized exchange where client sends rootUri and capabilities and server returns its capabilities.”

Explanation

Handshake like phone call — client says who it is and what language it speaks, server says what help it can offer.

How It Works

  1. Client sends initialize with root and caps
  2. Server responds with serverCapabilities
  3. Client sends initialized notification
  4. Server starts workspace indexing
  5. Features become available

Visual Explanation

lsp_initialization A Client B Initialize A->B step 1 C Server Ready B->C step 2

Semantic Network

semantic_lsp_initialization THIS LSP Initialization REL1 Related THIS--REL1 related REL2 Prereq THIS--REL2 builds from

Key Properties

  • Root from root_markers
  • Capabilities negotiation prevents unsupported calls
  • Once per attachment

Real-World Example

vim.lsp.enable('lua_ls') # triggers initialize

Connections

Edge Cases & Gotchas

  • Init before root detected — server indexes wrong dir
  • Advertising caps server lacks — client calls missing method