-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
Investigate providing reqstool as an LSP server for editor integration (VS Code, IntelliJ, Neovim, etc.).
Motivation
Currently the VS Code extension shells out to the reqstool CLI for data. An LSP server would enable a richer, real-time editor experience:
- Diagnostics — red squiggles on
@Requirements("REQ_xxx")annotations when the requirement is unverified, deprecated, or missing - Hover — show requirement status, title, significance, lifecycle state when hovering over a requirement ID
- Go-to-definition — jump from a
@Requirements("REQ_xxx")annotation to the requirement definition inrequirements.yml, or from an SVC to its requirement - Code lenses — show verification status inline above annotated methods
- File watching — re-parse automatically when
requirements.yml,svcs.yml,mvrs.yml, or test results change - Completions — autocomplete requirement IDs and SVC IDs in annotations and YAML files
Architecture considerations
- If investigate: replace intermediate data structures with in-memory SQLite as single source of truth #313 (SQLite migration) lands first, the LSP server would be backed by the same in-memory SQLite DB — queries for hover/diagnostics are just SQL
- If not, the LSP server wraps the existing
CombinedIndexedDatasetpipeline - The LSP protocol is editor-agnostic — works in VS Code, IntelliJ (with plugin), Neovim, Emacs, Sublime, etc.
- Python LSP libraries: pygls (well-maintained, async, LSP 3.17)
Scope
This is an initial investigation. Questions to answer:
- What LSP capabilities are most valuable for reqstool users?
- What is the minimum viable feature set for a first release?
- Should the LSP server be a separate package or part of reqstool-client?
- How does it interact with language-specific decorator packages (reqstool-python-decorators, reqstool-typescript-tags)?
- Performance: can the full parse pipeline run fast enough for interactive use, or do we need incremental parsing?
Related
- investigate: replace intermediate data structures with in-memory SQLite as single source of truth #313 — SQLite migration (LSP would benefit from queryable DB backend)
- reqstool-vscode-extension (existing VS Code extension that currently shells out to CLI)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels