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

The Problem

Editor knows syntax but not project types — what provides hover, go-to-definition across files?

Formal Definition

Per Wikipedia: “An LSP server is a process that implements Language Server Protocol to analyze workspace files and answer editor requests.”

Explanation

Server is the librarian — editor asks where is definition of User, server knows every shelf in the project.

How It Works

  1. Client starts server via cmd
  2. Client sends initialize with root
  3. Server indexes workspace files
  4. Client sends textDocument/hover etc
  5. Server replies with location/markers

Visual Explanation

lsp_server A Editor B LSP Server A->B step 1 C Workspace B->C step 2

Semantic Network

semantic_lsp_server THIS LSP Server REL1 Related THIS--REL1 related REL2 Prereq THIS--REL2 builds from

Key Properties

  • Language-specific per project
  • Runs out-of-process
  • Communicates via JSON-RPC
  • Advertises capabilities on init

Real-World Example

vim.lsp.config['clangd'] = {cmd={'clangd'}}

Connections

Edge Cases & Gotchas

  • Starting heavy server on huge monorepo slows init
  • Mismatched filetypes — server not attached