Skip to content

feat: Language Server Protocol (LSP) for editor integration #314

@jimisola

Description

@jimisola

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 in requirements.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

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions