Skip to content

feat: add initial LSP client extension#1

Open
jimisola wants to merge 6 commits intomainfrom
feat/initial-lsp-client
Open

feat: add initial LSP client extension#1
jimisola wants to merge 6 commits intomainfrom
feat/initial-lsp-client

Conversation

@jimisola
Copy link
Member

Summary

  • Thin VSCode extension that delegates all language intelligence to the reqstool lsp server over stdio
  • Replaces the old reqstool-vscode-extension (deprecated) which used direct CLI invocation and custom hover providers
  • No WorkspaceManager, hoverProvider, WebViewProvider, or types.ts — the LSP server handles all of that

What's included

  • src/extension.ts — starts reqstool lsp, guards if not installed, registers reqstool.refresh command
  • src/snippets.ts — YAML structural snippets (Requirement, SVC, MVR) with tabstops and choice placeholders
  • src/test/ui/extension.ui.test.ts — UI tests (activation without errors, extension installed check)
  • src/test/fixtures/requirements.yml and test.code-workspace
  • .github/workflows/ — lint, build (installs reqstool before tests), semantic PR check, release check, publish
  • Full project scaffold: package.json, tsconfig.json, eslint.config.mjs, .vscode-test.mjs, .gitignore, .vscodeignore, .npmrc, renovate.json5
  • README.md and CONTRIBUTING.md

LSP features (no client-side code needed)

Feature VSCode UI
Hover Hover tooltip
Completion IntelliSense
Go to definition F12
Outline Native Outline view (Ctrl+Shift+O)
Diagnostics Problems panel
Refresh Command Palette → reqstool: Refresh

Test plan

  • npm install && npm run compile — zero errors
  • npm run lint — clean
  • npm run build — produces .vsix
  • Install .vsix, open a workspace with requirements.yml → extension activates
  • Hover over annotated identifier → tooltip appears
  • Ctrl+Shift+O in requirements YAML → Outline shows symbols
  • Command Palette → reqstool: Refresh → no error
  • Remove reqstool binary → error notification with Open Docs button appears

Thin VSCode extension that delegates all language intelligence
(hover, completion, go-to-definition, outline, diagnostics) to
the reqstool LSP server via stdio. Includes YAML snippets,
CI workflows, and UI tests.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Add skipLibCheck for vscode-jsonrpc type mismatch with TS 5.x,
and use explicit .js extension for Node16 module resolution.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
- Commit package-lock.json so CI can run npm ci
- Add .vscode/launch.json + tasks.json for F5 debug workflow
- Add headless smoke test (extension registered, refresh command registered)
- Handle rejected promise from reqstool.refresh sendRequest
- Expand CONTRIBUTING.md with Option A (F5) and Option B (vsix) local testing

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Without isTrusted = true, any command: links the LSP server
embeds in hover content (e.g. go-to-definition, quick-fix actions)
are silently stripped by VS Code and rendered as plain text.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant