Skip to content

Commit a26126f

Browse files
authored
Merge pull request Piebald-AI#6 from micahstubbs/5/add-latex-texlab
2 parents 0c5d764 + a1a398a commit a26126f

File tree

5 files changed

+142
-1
lines changed

5 files changed

+142
-1
lines changed

.claude-plugin/marketplace.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,24 @@
212212
"name": "Piebald LLC",
213213
"email": "[email protected]"
214214
}
215+
},
216+
{
217+
"name": "texlab",
218+
"version": "0.1.0",
219+
"source": "./texlab",
220+
"description": "LaTeX language server with completion, references, and document symbols",
221+
"category": "development",
222+
"tags": [
223+
"latex",
224+
"tex",
225+
"lsp",
226+
"language-server",
227+
"texlab"
228+
],
229+
"author": {
230+
"name": "Micah Stubbs",
231+
"email": "[email protected]"
232+
}
215233
}
216234
]
217235
}

CLAUDE.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a Claude Code marketplace containing LSP (Language Server Protocol) plugins. Each plugin integrates a language server with Claude Code, providing code intelligence features like go-to-definition, find-references, hover info, and symbol search.
8+
9+
**Supported languages:** TypeScript/JavaScript, Rust, Python, Go, Java, Kotlin, C/C++, PHP, Ruby, C#, PowerShell, HTML/CSS, LaTeX
10+
11+
## Repository Structure
12+
13+
```
14+
.claude-plugin/marketplace.json # Marketplace manifest listing all plugins
15+
<language>/
16+
plugin.json # Plugin metadata (name, version, description, keywords)
17+
.lsp.json # LSP configuration (command, args, file extensions, transport)
18+
```
19+
20+
## Adding a New LSP Plugin
21+
22+
1. Create a new directory named after the LSP (e.g., `texlab/`)
23+
24+
2. Create `plugin.json`:
25+
```json
26+
{
27+
"name": "plugin-name",
28+
"version": "0.1.0",
29+
"description": "Description of the language server",
30+
"author": { "name": "Piebald LLC", "email": "[email protected]" },
31+
"repository": "https://github.com/...",
32+
"license": "...",
33+
"keywords": ["language", "lsp", "language-server"]
34+
}
35+
```
36+
37+
3. Create `.lsp.json`:
38+
```json
39+
{
40+
"languageId": {
41+
"command": "lsp-executable",
42+
"args": ["--stdio"],
43+
"extensionToLanguage": {
44+
".ext": "languageId"
45+
},
46+
"transport": "stdio",
47+
"initializationOptions": {},
48+
"settings": {},
49+
"maxRestarts": 3
50+
}
51+
}
52+
```
53+
54+
4. Add entry to `.claude-plugin/marketplace.json` in the `plugins` array
55+
56+
5. Add setup instructions to `README.md` in the language-specific details section
57+
58+
## LSP Configuration Fields
59+
60+
- `command`: The executable to run (must be in PATH)
61+
- `args`: Command-line arguments (typically `["--stdio"]`)
62+
- `extensionToLanguage`: Maps file extensions to LSP language IDs
63+
- `transport`: Always `"stdio"` for this project
64+
- `maxRestarts`: Number of restart attempts on crash (default: 3)
65+
- `initializationOptions` / `settings`: LSP-specific configuration objects
66+
67+
## Notes
68+
69+
- Each plugin directory name should match the LSP tool name (e.g., `rust-analyzer`, `gopls`, `pyright`)
70+
- The `.lsp.json` can define multiple language servers in one file (see `vscode-langservers` for HTML + CSS example)
71+
- Some LSPs require complex initialization (see `powershell-editor-services` for inline module loading example)

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Claude Code LSPs
22

3-
This repository contains a [Claude Code marketplace](https://code.claude.com/docs/en/plugin-marketplaces) with plugins that offer LSP servers for TypeScript, Rust, Python, Go, Java, Kotlin, C/C++, PHP, Ruby, C#, PowerShell, and HTML/CSS. [LSP servers](https://microsoft.github.io/language-server-protocol) provide powerful and familiar code intelligence features to IDEs, and now Claude Code directly.
3+
This repository contains a [Claude Code marketplace](https://code.claude.com/docs/en/plugin-marketplaces) with plugins that offer LSP servers for TypeScript, Rust, Python, Go, Java, Kotlin, C/C++, PHP, Ruby, C#, PowerShell, HTML/CSS, and LaTeX. [LSP servers](https://microsoft.github.io/language-server-protocol) provide powerful and familiar code intelligence features to IDEs, and now Claude Code directly.
44

55
[**Claude Code is going to officially support LSP soon.**](https://www.reddit.com/r/ClaudeAI/comments/1otdfo9/lsp_is_coming_to_claude_code_and_you_can_try_it) In 2.0.30 (October 31st) they adding the working beginnings of a system to run LSP servers from plugins automatically on startup, and an `LSP` tool (enable via `$ENABLE_LSP_TOOL=1`) that Claude can use to
66
- Go to the definition for symbols (`goToDefinition`)
@@ -246,3 +246,27 @@ bun install -g vscode-langservers-extracted
246246
This provides `vscode-html-language-server` and `vscode-css-language-server` executables.
247247

248248
</details>
249+
250+
<details>
251+
<summary>LaTeX (<code>texlab</code>)</summary>
252+
253+
Install **texlab**, a cross-platform LSP implementation for LaTeX:
254+
```bash
255+
# Cargo
256+
cargo install --locked texlab
257+
258+
# macOS
259+
brew install texlab
260+
261+
# Arch Linux
262+
pacman -S texlab
263+
264+
# Windows
265+
scoop install texlab
266+
# or
267+
choco install texlab
268+
```
269+
270+
The `texlab` executable needs to be in your PATH. Supports `.tex`, `.bib`, `.cls`, and `.sty` files.
271+
272+
</details>

texlab/.lsp.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"latex": {
3+
"command": "texlab",
4+
"args": [],
5+
"extensionToLanguage": {
6+
".tex": "latex",
7+
".bib": "bibtex",
8+
".cls": "latex",
9+
".sty": "latex"
10+
},
11+
"transport": "stdio",
12+
"initializationOptions": {},
13+
"settings": {},
14+
"maxRestarts": 3
15+
}
16+
}

texlab/plugin.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "texlab",
3+
"version": "0.1.0",
4+
"description": "LaTeX language server with completion, references, and document symbols",
5+
"author": {
6+
"name": "Micah Stubbs",
7+
"email": "[email protected]"
8+
},
9+
"repository": "https://github.com/latex-lsp/texlab",
10+
"license": "GPL-3.0",
11+
"keywords": ["latex", "tex", "lsp", "language-server", "texlab"]
12+
}

0 commit comments

Comments
 (0)