Skip to content

feat(lsp): Language Server Protocol for skill frontmatter autocompletion (#27) - #46

Merged
00200200 merged 1 commit into
mainfrom
feat/lsp-skill-frontmatter
Oct 7, 2026
Merged

00200200 merged 1 commit into
mainfrom
feat/lsp-skill-frontmatter

Conversation

@00200200

@00200200 00200200 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Closes #27

Summary of Changes

  • Implemented lightweight stdlib Language Server Protocol (LSP) server in src/cinch/lsp.py using standard JSON-RPC 2.0 with Content-Length framing and NDJSON fallback.
  • Added support for core LSP methods:
    • initialize, initialized, shutdown, exit
    • textDocument/didOpen, textDocument/didChange, textDocument/didClose
    • textDocument/completion: provides completions for schema fields (ALLOWED_KEYS), dialect names, triggers, booleans, and glob patterns.
    • textDocument/hover: provides markdown tooltips explaining harness-specific behavior and limitations.
    • textDocument/publishDiagnostics: real-time frontmatter validation flagging syntax issues, unrecognized keys (with close match suggestions), missing/invalid name (kebab-case), description length boundaries, and glob validity.
  • Added cinch lsp subcommand in src/cinch/cli.py with optional --strict mode.
  • Expanded key suggestions in src/cinch/schema.py for common alias mappings (variables, compatibility, params, dependencies).
  • Added full unit test coverage in tests/test_lsp.py covering lifecycle, diagnostics, completion, hover, and stdio framing.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

👋 Thanks for opening this pull request, @00200200!

We're thrilled to have your contribution to cinch! Here is a quick checklist to help get your PR merged smoothly:

  • Linked Issue: Issue reference detected in PR body. ✅
  • Local Verification: Verify all checks pass locally using uv run pytest and uv run ruff check ..
  • Commit Hygiene: Ensure commit messages follow conventional commit style (feat:, fix:, docs:).

A maintainer will review your code shortly. Feel free to ping in comments if you have any questions! 🚀

@github-actions github-actions Bot added enhancement New feature or request tests Testing and quality assurance labels Oct 7, 2026
@00200200
00200200 merged commit 544c8a7 into main Oct 7, 2026
8 checks passed
@00200200
00200200 deleted the feat/lsp-skill-frontmatter branch October 7, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tests Testing and quality assurance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(lsp): Implement lightweight Language Server Protocol (LSP) for skill frontmatter autocompletion

1 participant