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

The Problem

How do editor and server exchange messages without blocking UI?

Formal Definition

Per Wikipedia: “LSP transport uses JSON-RPC over stdio or TCP with Content-Length headers to send requests, responses and notifications.”

Explanation

Like passing notes with envelope size on front — length header tells reader where note ends.

How It Works

  1. Client encodes JSON-RPC with header
  2. Writes to server stdin
  3. Server reads Content-Length
  4. Server decodes and dispatches
  5. Server replies same way

Visual Explanation

lsp_transport A Client B Transport A->B step 1 C Server B->C step 2

Semantic Network

semantic_lsp_transport THIS LSP Transport REL1 Related THIS--REL1 related REL2 Prereq THIS--REL2 builds from

Key Properties

  • Stdio default in neovim
  • TCP alternative for remote
  • Header-based framing avoids delimiter issues

Real-World Example

Content-Length: 123\r\n\r\n{"jsonrpc":"2.0",...}

Connections

Edge Cases & Gotchas

  • Mixing stdout logs with transport corrupts stream
  • Forgetting \r\n header causes hang