数据库安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Docker
- 底层运行要求
- Node.js · Deno · Python · Docker
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: multi-lsp
description: This skill should be used when the user asks about "LSP", "language server", "gopls", "pyright"…
category: 工程开发
runtime: Node.js / Deno / Python / Docker
---
# multi-lsp 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Philosophy / Stack Detection Algorithm / Primary Language Detection”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Philosophy / Stack Detection Algorithm / Primary Language Detection”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Philosophy / Stack Detection Algorithm / Primary Language Detection”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: multi-lsp
description: This skill should be used when the user asks about "LSP", "language server", "gopls", "pyright"…
category: 工程开发
source: tomevault-io/skills-registry
---
# multi-lsp
## 什么时候使用
- 把工程方向的常用动作沉淀成 Agent 可调用的技能 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Philosophy / Stack Detection Algorithm / Primary Language Detection」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "multi-lsp" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Philosophy / Stack Detection Algorithm / Primary Language Detection
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js / Deno / Python / Docker | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Multi-LSP Combiner
The Language Server Protocol (LSP) transformed how editors and IDEs provide language intelligence. Instead of every editor implementing Go support, Python support, and Rust support independently, each language provides a single server that speaks LSP, and every editor connects to it. The result: one implementation per language, universal editor support.
But modern software projects are not monolingual. A typical Go microservice project includes Go source files, Protocol Buffer definitions, SQL migrations, YAML configuration, Dockerfiles, shell scripts, HTML templates, and markdown documentation. Each of these languages and formats has its own LSP server. Configuring them individually is tedious, error-prone, and fragile. Adding a new .proto file to a Go project should not require manual installation and configuration of buf or pbls -- it should just work.
The Multi-LSP Combiner solves this problem. It scans the project, identifies every language and framework in use, determines which LSP servers are needed, installs missing ones, and generates a unified configuration for the editor. The goal is zero manual LSP configuration: clone a repo, run the setup, and every file type has full language intelligence.
Philosophy
Modern projects are polyglot by default. A Go backend with gRPC uses at minimum: Go, Protocol Buffers, YAML, SQL, Docker, Shell, and Markdown. A Node.js frontend adds TypeScript, HTML, CSS, Tailwind, JSON, and possibly GraphQL. The biodoia ecosystem (framegotui, memogo, govai, cligolist) combines Go + templ + HTMX + HTML/CSS + Protocol Buffers + YAML + Docker + Shell + SQL. Each language deserves first-class editor support.
Each language has a best-in-class LSP server. gopls for Go, rust-analyzer for Rust, pyright for Python, typescript-language-server for TypeScript. These servers are maintained by their respective language communities and represent years of engineering. The Multi-LSP approach uses the best tool for each job rather than one mediocre tool for everything.
Auto-detection eliminates configuration drift. When Terraform files are added to a project, the LSP configuration should update automatically. When Python is removed, the Python LSP should no longer load. Detection is based on file presence, not manual declaration.
The combined experience should feel unified. A developer should not notice that seven different LSP servers are running. Completion, diagnostics, formatting, and refactoring should work seamlessly regardless of which server provides the intelligence.
Stack Detection Algorithm
Stack detection is the foundation of the Multi-LSP Combiner. The algorithm scans the project root and key subdirectories for language markers -- specific files and file extensions that indicate which languages and tools are in use.
Primary Language Detection
The detection proceeds in three phases: language identification, framework detection, and auxiliary tool detection.
Phase 1: Language markers. Each marker maps to one or more LSP servers:
| Marker | Language | LSP Server(s) |
|---|---|---|
go.mod |
Go | gopls |
package.json |
JavaScript/TypeScript | typescript-language-server, eslint |
Cargo.toml |
Rust | rust-analyzer |
pyproject.toml / setup.py / requirements.txt |
Python | pyright, ruff |
*.proto / buf.yaml |
Protocol Buffers | buf, pbls |
Dockerfile / compose.yaml |
Docker | docker-langserver |
*.yaml / *.yml |
YAML | yaml-language-server |
*.html / *.css |
HTML/CSS | vscode-html/css-language-server |
*.sh / *.bash |
Shell | bash-language-server |
.github/workflows/*.yml |
GitHub Actions | actionlint |
*.tf / terraform/ |
Terraform | terraform-ls |
For the complete marker list covering all 20+ supported languages (Lua, Zig, Nix, GraphQL, TOML, Markdown, SQL, JSON, and more), see references/server-catalog.md.
Phase 2: Framework-specific detection. Certain framework combinations require additional LSP servers or special configuration:
framegotui projects (detected by
github.com/biodoia/framegotuiingo.mod): gopls + templ LSP + vscode-html-language-server + vscode-css-language-server. The templ LSP handles.templfiles and delegates HTML/CSS completions to their respective servers.Next.js projects (detected by
nextinpackage.jsondependencies): typescript-language-server + tailwindcss-language-server + eslint.gRPC projects (detected by
google.golang.org/grpcingo.modor*.protofiles): gopls + buf + proto LSP. buf handles proto linting and formatting, gopls handles generated Go code.HTMX projects (detected by
htmxreferences in HTML files or Go templates): vscode-html-language-server configured with HTMX attribute completions. If using Go templ, the templ LSP handles HTMX within.templfiles.
Phase 3: Auxiliary tool detection. These files indicate formatting and linting preferences that affect LSP configuration:
.prettierrc/prettier.config.js-- prettier as formatter.eslintrc/eslint.config.js-- eslint LSP integrationbiome.json-- biome LSP (replaces eslint + prettier for JS/TS/JSON/CSS)deno.json-- deno LSP (replaces typescript-language-server)tailwind.config.js/tailwind.config.ts-- tailwindcss-language-server
When biome.json is present, the combiner prefers biome over separate eslint + prettier configurations. When deno.json is present, it uses the deno built-in LSP instead of typescript-language-server.
Configuration Generation
The combiner generates editor-specific configuration based on the detected stack. Supported editors:
- Neovim (nvim-lspconfig): Each server gets its own
lspconfig.SERVERNAME.setup({})call with server-specific settings. Also supports mason.nvim for auto-installation. - VS Code (settings.json): Per-language settings with formatter selection and extension recommendations.
- Helix (languages.toml): Declarative language blocks with native multi-LSP support.
- Zed (settings.json): LSP servers configured under the
"lsp"key with command, args, and init options. - Emacs: Both lsp-mode and eglot (built-in for Emacs 29+) configurations.
- Kakoune: kak-lsp TOML configuration.
- Claude Code (.claude/settings.json): LSP integration providing completion and diagnostic context during AI coding sessions.
Full editor configuration templates are available in references/editor-configs.md.
Combination Strategies
Running multiple LSP servers simultaneously requires a strategy for combining their results.
Side-by-Side (Recommended)
Each LSP server runs independently. The editor routes requests to the appropriate server based on file type. The editor's LSP client manages the lifecycle of each server: starting it when a matching file is opened, sending requests to the correct server, and merging completions/diagnostics from multiple servers when a file matches more than one (e.g., HTML files receiving completions from both the HTML LSP and the Tailwind LSP).
Multiplexer Approach
A meta-LSP server proxies requests to multiple backend servers:
- efm-langserver: Integrates external linters and formatters (shellcheck, hadolint, markdownlint, actionlint).
- diagnostic-languageserver: Aggregates diagnostics from multiple linters into a single LSP stream.
- mcp-language-server: Exposes LSP features as MCP tools for AI coding assistants.
Unified Approach
Some tools provide multi-language LSP support in a single server:
- biome: Handles JavaScript, TypeScript, JSON, and CSS in one server.
- vscode-langservers-extracted: Provides HTML, CSS, and JSON servers in one npm package.
The recommended approach for most projects is side-by-side with efm-langserver for additional linting.
Installation Workflow
The installation workflow is automated through two scripts in the scripts/ directory.
detect-stack.sh scans the current directory and outputs a structured report of detected languages, required LSP servers, installed servers, and missing servers with install commands.
install-lsp.sh takes either a preset name or auto-detects the stack, then installs all missing LSP servers using the appropriate package manager for the current OS. It supports Arch/Manjaro (pacman/yay), macOS (brew), and Ubuntu/Debian (apt) with fallbacks to npm, pip, go install, and cargo install.
The full installation flow:
- Run
detect-stack.shto identify the stack - Review the detection results
- Run
install-lsp.shto install missing servers - Choose an editor target for configuration generation
- Validate all servers with a version check
Pre-built stack presets are available in references/stack-presets.md for common project types.
Troubleshooting
LSP Server Not Starting
Check in order:
- Binary exists: Run
which goplsorcommand -v gopls. If missing, the server is not installed or not in PATH. - Permissions: The binary must be executable.
- Dependencies: Some servers need runtime dependencies (typescript-language-server needs
typescript, pyright needspython3). - Log output: Start the server manually with
--log-level debugor--verboseflags. - Port conflicts: Check for conflicts with
ss -tlnp | grep PORT.
Slow Diagnostics
- Tune diagnostic delay: Increase gopls
diagnosticsDelayto 500ms-1000ms for large projects. - Limit workspace scope: Configure explicit excludes for
node_modules/,.git/,vendor/,dist/,build/. - Reduce enabled analyses: Disable non-essential analyzers in large codebases.
- Separate workspace folders: Open each sub-project as a separate workspace folder instead of the monorepo root.
Conflicting Formatters
- Identify all formatters: Multiple tools may claim the same file type (e.g., both prettier and biome for TypeScript).
- Set explicit priority: Designate one formatter per file type. In Neovim, use
vim.lsp.buf.format({ name = "specific_server" }). - Disable formatting on non-primary servers: Set
capabilities.documentFormattingProvider = falseon secondary servers.
Memory Usage
- Monitor per-server memory: Run
ps aux | grep -E 'gopls|pyright|typescript'. - Lazy loading: Configure servers to start only when a matching file is opened.
- Limit gopls memory: Set
GOGC=100or lower. Use-remote=autofor shared instances. - Limit typescript-language-server memory: Set
--tsserver.maxTsServerMemory(default 3072 MB).
Server-Specific Tips
gopls: Set GOFLAGS=-tags=... for build tag support. Enable vulncheck for vulnerability scanning. Use gofumpt for stricter formatting.
pyright vs ruff: Use pyright for type checking and completion, ruff for linting and formatting. The recommended Python setup is pyright + ruff (two servers).
typescript-language-server: Increase max heap size for large projects: --tsserver.maxTsServerMemory 4096. Use project references for monorepos.
rust-analyzer: Change check command to clippy for more diagnostics: "rust-analyzer.check.command": "clippy". For large projects, set cargo.buildScripts.enable: false during initial loading.
Advanced Topics
Custom LSP Configuration Per Project
Create a .lspconfig directory in the project root with server-specific overrides (gopls.json, pyright.json, eslint.json). The combiner reads these files and merges them with the default configuration during generation.
LSP Logging and Debugging
Enable verbose logging to diagnose protocol-level issues:
gopls -rpc.trace -v serve 2>/tmp/gopls.log
typescript-language-server --stdio --log-level 4 2>/tmp/tsserver.log
In Neovim, set vim.lsp.set_log_level("debug") and check :LspLog for detailed protocol traces.
Semantic Tokens and Inlay Hints
Most modern LSP servers support semantic tokens (language-aware highlighting beyond regex-based syntax) and inlay hints (inline type annotations, parameter names). Enable both in the editor config for the best experience. Disable inlay hints if the visual noise is distracting.
Code Actions and Refactoring
Each LSP server provides different code actions:
- gopls: Extract function/variable, fill struct, add/remove tags, organize imports, generate test
- rust-analyzer: Extract function/variable/module, generate impl/derive, unwrap Result, add missing match arms
- pyright: Organize imports, add type annotations, extract variable
- typescript-language-server: Extract function/constant, move to file, organize imports, add missing imports
The Multi-LSP Combiner ensures all these capabilities are available for every language in the project without manual configuration.
Additional Resources
For detailed information, consult these reference files and scripts:
references/server-catalog.md-- exhaustive catalog of LSP servers with installation, configuration, capabilities, and known issuesreferences/editor-configs.md-- complete configuration templates for Neovim, VS Code, Helix, Zed, Emacs, Kakoune, and Claude Codereferences/stack-presets.md-- pre-built LSP configurations for Go Full Stack, Node.js Full Stack, Rust Full Stack, Python Full Stack, DevOps, and the biodoia Ecosystemscripts/detect-stack.sh-- automated stack detection scriptscripts/install-lsp.sh-- automated LSP server installation script
Source: biodoia/biodoia-skills-marketplace — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核