/editors-ide-extension-development:editor-vscode-architecture-and-the-protocol-layerfrom editors-ide-extension-development
Explains VS Code's multi-process architecture, extension host, settings precedence, remote development (SSH/containers/WSL), and the LSP/DAP/Tree-sitter protocol layer that made editors interchangeable.
Ships in editors-ide-extension-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Part 2 of 5 of the Editors, IDEs and Extension Development reference (plugin
editors-ide-extension-development), covering §6–§11. Sibling skills:editor-choosing-vim-neovim-and-emacs(§0–§5),editor-vscode-extension-development(§12–§17),editor-internals-buffers-rendering-and-performance(§18–§23),editor-reference(§24–§30). Section numbers are shared across the set; a reference written as §N →skillpoints into that sibling skill.Currency: Modal editing, buffer data structures and the protocols are stable. Two areas moved. See §24 →
editor-referencefor the AI and agent layer in editors, and the editor landscape itself.
⚠️ The organizing insight, and it reframes the whole "editor wars" conversation: ⚠️ the important layer stopped being the editor and became the PROTOCOLS. In the 2010s each editor reimplemented completion, go-to-definition and highlighting for every language — an editors × languages problem. ⚠️ LSP and Tree-sitter collapsed that into editors + languages, which is why new editors can be competitive within a year and why "which editor" matters far less than it used to (§9).
Complements a programming-languages reference (parsing and compilers), a GitHub/Jira reference (the surrounding workflow), and a frontend reference (webview UI).
⚠️ GOTCHA boxes mark things that waste days — extension activation, buffer assumptions, and the performance traps.
The three ideas that organize this document:
- ⚠️ Editor choice is mostly preference; the protocol support is the substance (§9–§11). Ask what LSP and Tree-sitter integration looks like, not what the theme looks like.
- ⚠️ Modal editing is a language, not a set of shortcuts (§3 →
editor-choosing-vim-neovim-and-emacs). Operators compose with motions and text objects — learning that grammar is the whole payoff, and memorizing keybindings is the failure mode.- ⚠️ Everything in an editor is a latency budget (§18–§20 →
editor-internals-buffers-rendering-and-performance). Text buffers, rendering and parsing are all solved problems whose solutions exist because naive approaches feel slow at scale.
⚠️ Understanding the process model explains nearly every extension constraint:
⚠️ MAIN PROCESS Electron main; window and lifecycle management
⚠️ RENDERER the UI. ⚠️ Extensions CANNOT touch the DOM
⚠️ EXTENSION HOST ⚠️ a SEPARATE Node.js process where extensions run.
⚠️ This isolation is why a bad extension can't crash the UI, and why
there is no direct DOM access — everything is an RPC away
LANGUAGE SERVERS ⚠️ further separate processes (§9)
SHARED PROCESS long-running background work
⚠️ GOTCHA — extensions cannot manipulate the editor's DOM, and this surprises every web developer starting extension work. ⚠️ You contribute through declared extension points and APIs; for custom UI you use a WEBVIEW, which is an isolated iframe with a message-passing bridge (§15 →
editor-vscode-extension-development). ⚠️ If your design requires arbitrary DOM control of the editor chrome, redesign it.
⚠️ Monaco is the editor component — the same one that runs in the browser — and it is available standalone, ⚠️ though it is NOT the same as embedding VS Code: Monaco gives you the text editing widget without the workbench, extensions or LSP client.
SETTINGS PRECEDENCE ⚠️ default → user → remote → workspace → folder →
language-specific. ⚠️ Later wins, and this ordering explains most
"why isn't my setting applying" confusion
settings.json · keybindings.json · tasks.json · launch.json · extensions.json
⚠️ .vscode/ in the repo team-shared settings, recommended extensions,
debug configs. ⚠️ Commit these — they're onboarding infrastructure
MULTI-ROOT WORKSPACES ⚠️ .code-workspace file; several folders, one window
PROFILES ⚠️ isolated sets of extensions and settings — the clean answer to
"my Python setup is fighting my TypeScript setup"
⚠️ Language-specific settings ("[python]": { ... }) are underused and solve most
formatter conflicts.
⚠️ Workspace Trust: ⚠️ untrusted workspaces run in Restricted Mode with tasks and
many extensions disabled — a real security feature, and a real source of "why doesn't
anything work" when someone dismisses the prompt.
⚠️ Architecturally the most interesting VS Code feature: the extension host runs on the REMOTE, with only the UI local.
REMOTE-SSH · DEV CONTAINERS (⚠️ devcontainer.json — reproducible toolchain
per repo, and genuinely excellent onboarding infrastructure) · WSL ·
CODESPACES (hosted dev containers) · ⚠️ TUNNELS
⚠️ The consequence extension authors must internalize: ⚠️ your extension may run on a
different machine from the UI, so file paths, environment variables and available
binaries are the REMOTE's. ⚠️ Extensions declare extensionKind as ui or
workspace to control where they run, and getting this wrong produces extensions that
work locally and break over SSH.
⚠️ Before LSP: every editor implemented language intelligence for every language — M editors × N languages. ⚠️ After LSP: M + N. This is the single most important structural change in developer tooling in the last decade.
⚠️ JSON-RPC over stdio (or sockets). Editor = CLIENT, language tool = SERVER
INITIALIZE handshake ⚠️ capabilities negotiated BOTH ways — the client says
what it supports, the server says what it provides
DOCUMENT SYNC full or incremental
⚠️ REQUESTS completion · hover · definition · references · rename ·
formatting · code actions · signature help · document/workspace symbols ·
semantic tokens · inlay hints · call hierarchy
⚠️ NOTIFICATIONS publishDiagnostics (⚠️ server → client, unsolicited —
this is how squiggles appear without being asked for)
⚠️ Practical implementation notes:
⚠️ The same idea for debugging: Debug Adapter Protocol decouples editors from debuggers.
LAUNCH vs ATTACH · breakpoints (line, conditional, function, data, logpoints)
⚠️ STACK TRACE / SCOPES / VARIABLES requests · stepping · evaluate (watch, REPL)
⚠️ Logpoints are underused — ⚠️ a breakpoint that logs a message instead of stopping,
so you get printf debugging without editing the source or redeploying.
⚠️ Debug adapters are separate processes like language servers, and launch.json
configures them.
⚠️ The other half of the modern stack: an incremental parsing library that produces a real syntax tree, fast enough to re-parse on every keystroke, and ERROR-TOLERANT.
⚠️ INCREMENTAL re-parses only what changed
⚠️ ERROR-TOLERANT produces a usable tree from broken code — essential,
because code is broken while you type it
⚠️ QUERIES S-expression patterns over the tree, used for highlighting,
folding, indentation, and structural selection
GRAMMARS per-language, generated from a JS grammar definition
⚠️ Why it replaced regex highlighting: ⚠️ regex-based highlighting (TextMate grammars)
cannot see structure, degrades on large files, and produces the familiar wrong-colours
artifacts in nested or unusual constructs. Tree-sitter knows a token is a function name
because it's in the function-name position.
⚠️ The ecosystem built on it is significant: Neovim, Helix and Zed use it natively;
GitHub code search and semantic highlighting use it; and ⚠️ tools like ast-grep do
structural search-and-replace over the tree, which is a categorically better way to do
large mechanical refactors than regex.
⚠️ The division of labour worth internalizing: ⚠️ Tree-sitter gives you SYNTAX
cheaply and locally; LSP gives you SEMANTICS expensively and project-wide. You need
both, and confusing them leads to trying to do type resolution with a parser.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/editor-choosing-vim-neovim-and-emacsUse when learning or configuring a terminal editor, or when someone asks which editor to use: choosing honestly rather than by tribe, nano and the cases it fits, vim's actual model of operators, motions, text objects and counts as a composable grammar, configuring vim and Neovim including Lua configuration and plugin managers, and what Emacs is and why its users stay. Includes the router for the whole editors and IDEs reference./editor-internals-buffers-rendering-and-performanceUse when building an editor or diagnosing one that is slow: text buffer data structures from gap buffers to piece tables and ropes, rendering and viewport virtualisation, indexing and code intelligence, how the JetBrains platform differs, terminal UI programming, and the editor performance work — startup, large files, input latency — that decides whether an editor feels fast./editor-referenceUse when checking an editor anti-pattern or misconception, looking up a startup, latency or file-size figure, finding the resources, or needing a picker — plus the current state of the AI and agent layer in editors and the editor landscape. Companion to the other editors and IDEs skills./editor-vscode-extension-developmentUse when building a VS Code extension end to end: the anatomy of an extension and its manifest, contribution points and activation events, the API surfaces for commands, editors, tasks and tree views, webviews with their message passing and content security constraints, writing a language server, and testing and publishing to the marketplace.npx claudepluginhub the-vibey-project/vibey --plugin editors-ide-extension-development