How manateelazycat/lsp-bridge works
Project type and purpose
• This is an open-source Emacs plugin plus external Python service (“lsp-bridge”) that provides a blazing-fast LSP client in Emacs.
• The Elisp side is the frontend: completion UI, keybindings, commands, multi-backend integration. The Python side is a multi‐threaded LSP request dispatcher and handler, talking to one or more language servers via JSON-RPC.
• It also supports remote completion via SSH/tramp and multi-server fusion via simple JSON config files.
File structure
• Top-level Elisp files: lsp-bridge.el (main), lsp-bridge-epc.el (IPC glue), plus many feature modules (peek, code-action, diagnostic, breadcrumb, semantic-tokens, etc.).
• The “acm” directory contains the asynchronous completion menu engine in Elisp.
• Python service (“python-lsp-bridge” wrapper, lsp_bridge.py) plus “core” modules: core/lspserver.py (JSON-RPC handler), core/fileaction.py, core/handler/* (per-method LSP handlers), core/remote_file.py (SSH/tramp support), plus backends for Codeium, Copilot, TabNine, search_word, etc.
• “langserver” and “multiserver” directories hold JSON definitions of single and multi-server configs.
• “resources” holds StarDict data used by the search-word backend.
• “test” folder contains unit tests for both Elisp and Python sides.
• Configuration files: pyproject.toml, uv.lock, CI workflow in .github/workflows/test.yml.
README insights
• The README describes the high-level architecture (there are two PNGs: framework.png for local, remote_file_framework.png for remote completion).
• Emphasizes plug-and-play design, multi-backend fusion, and remote/SSH/devcontainer support.
• Detailed sections enumerate all commands, keymaps, Elisp options, Python dependencies, and supported language servers.
Details to capture
• Front-end feature modules (peek, code-action, inlay-hint, semantic-tokens).
• Python service internals: handler registry, file model, remote file proxy.
• JSON config loading precedence (user-dir overrides default).
• Flow variants: local mode vs. remote SSH/tramp vs. devcontainer.
• Test harness (test/ folder) to indicate QA integration.