diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index e437c61..1aba7cb 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -45,6 +45,16 @@ "author": { "name": "vnz" } + }, + { + "name": "yaml-ls", + "description": "YAML language server (yaml-language-server) for code intelligence, go-to-definition, find-references, and hover docs", + "version": "1.0.0", + "source": "./plugins/yaml-ls", + "category": "development", + "author": { + "name": "vnz" + } } ] } diff --git a/README.md b/README.md index f4996de..c3ec631 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Personal Claude Code plugin marketplace by vnz. | `date-context` | Injects current date/time at session start to fix web search year issues | | `terraform-ls` | Terraform language server for code intelligence (go-to-definition, hover, diagnostics) | | `bash-ls` | Bash language server for code intelligence, diagnostics, and formatting in shell scripts | +| `yaml-ls` | YAML language server for code intelligence (go-to-definition, find-references, hover, diagnostics) | | `dependabot` | Check for dependency updates using Dependabot CLI with auto-detection of package managers | ## Usage @@ -33,6 +34,7 @@ After adding the marketplace, install any plugin: /plugin install date-context@cc-plugins-vnz /plugin install terraform-ls@cc-plugins-vnz /plugin install bash-ls@cc-plugins-vnz +/plugin install yaml-ls@cc-plugins-vnz /plugin install dependabot@cc-plugins-vnz ``` diff --git a/plugins/yaml-ls/.claude-plugin/plugin.json b/plugins/yaml-ls/.claude-plugin/plugin.json new file mode 100644 index 0000000..d9351fe --- /dev/null +++ b/plugins/yaml-ls/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "yaml-ls", + "version": "1.0.0", + "description": "YAML language server (yaml-language-server) for code intelligence, go-to-definition, find-references, and hover docs in YAML files (.yaml, .yml)", + "license": "MIT", + "author": { + "name": "vnz" + }, + "repository": "https://github.com/vnz/cc-plugins", + "keywords": ["yaml", "yml", "lsp", "language-server", "schema", "validation"] +} diff --git a/plugins/yaml-ls/.lsp.json b/plugins/yaml-ls/.lsp.json new file mode 100644 index 0000000..f941a28 --- /dev/null +++ b/plugins/yaml-ls/.lsp.json @@ -0,0 +1,10 @@ +{ + "yaml-language-server": { + "command": "yaml-language-server", + "args": ["--stdio"], + "extensionToLanguage": { + ".yaml": "yaml", + ".yml": "yaml" + } + } +} diff --git a/plugins/yaml-ls/README.md b/plugins/yaml-ls/README.md new file mode 100644 index 0000000..abe9a48 --- /dev/null +++ b/plugins/yaml-ls/README.md @@ -0,0 +1,63 @@ +# yaml-ls + +YAML language server plugin for Claude Code, providing code intelligence features for YAML files. + +## Features + +| Feature | Description | +|---------|-------------| +| **goToDefinition** | Navigate to anchor definitions | +| **findReferences** | Find all alias usages across your file | +| **hover** | Inline documentation from JSON Schema associations | +| **diagnostics** | Real-time validation and error checking | + +## Supported Files + +| Extension | Language ID | Description | +|-----------|-------------|-------------| +| `.yaml` | `yaml` | YAML configuration | +| `.yml` | `yaml` | YAML configuration (short extension) | + +## Prerequisites + +Requires [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) in your PATH. + +```bash +npm install -g yaml-language-server +``` + +## Installation + +```bash +# Add marketplace from vnz/cc-plugins (aliased as cc-plugins-vnz) +/plugin marketplace add vnz/cc-plugins + +# Install plugin from the new marketplace +/plugin install yaml-ls@cc-plugins-vnz +``` + +Enable LSP in your Claude Code settings (`~/.claude/settings.json`): + +```json +{ + "env": { + "ENABLE_LSP_TOOL": "1" + } +} +``` + +## Troubleshooting + +### Plugin not visible +Run `/plugin list` and verify the plugin appears. Try reinstalling if needed. + +### LSP not working +1. Verify yaml-language-server is in your PATH: `which yaml-language-server` +2. Check that `ENABLE_LSP_TOOL=1` is set in your settings and restart Claude Code. +3. Check Claude Code logs for any `yaml-language-server` errors. + +## Links + +- [yaml-language-server GitHub](https://github.com/redhat-developer/yaml-language-server) +- [YAML Specification](https://yaml.org/spec/) +- [JSON Schema Store](https://www.schemastore.org/json/) (for schema associations)