Napper LSP: Phase 1-2 scaffold, shared features, 14 integration tests#8
Merged
MelbourneDeveloper merged 24 commits intomainfrom Mar 26, 2026
Merged
Napper LSP: Phase 1-2 scaffold, shared features, 14 integration tests#8MelbourneDeveloper merged 24 commits intomainfrom
MelbourneDeveloper merged 24 commits intomainfrom
Conversation
New shared modules in Napper.Core consumed by the LSP: - CurlGenerator.fs: generates curl commands from NapRequest - SectionScanner.fs: finds section header positions for document symbols Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extension now checks bundled bin/ CLI before falling back to PATH - Add extensionDir tracking to resolve bundled binary path - Improve checkVersionMatch to check storage, bundled, then PATH - Add debug logging throughout CLI version check and run flow - Refactor installParams/tryBinaryInstall to use DownloadBinaryParams type - Remove redundant settings.json injection from vscode-test setup - Import CLI_BIN_DIR and DownloadBinaryParams where needed
- Run Prettier on cliInstaller.ts and extension.ts - Run Fantomas on TestHelpers.fs and CliArgTests.fs - Thread &Path through route_completions/collect_file_completions to eliminate set_current_dir race condition in parallel Rust tests - Merge complete_* test assertions into route_completions_* tests
- Rust: apply cargo fmt to lib.rs (route_completions signature, cwd binding, NAP_RUN_COMMAND match arm) - TypeScript: split oversized arrow functions in cliInstaller.ts (handleNon200, downloadPair extracted) to satisfy max-lines-per-function; move edit/import command registrations to editAndImportCommands.ts - F#: add findRepoRoot() to TestHelpers so CLI integration tests locate the build-output napper binary (bin/Debug/net10.0/napper) instead of falling back to bare 'napper' which is not on PATH in CI
bf152dd to
7b98aec
Compare
- Add Napper.Lsp test execution to test-fsharp Makefile target - Skip LSP coverage threshold when 0 assemblies covered (integration tests use subprocess) - Guard coverage extraction when report file missing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR;
New
napper-lspF# language server (Phase 1-2 only — NO cutover). Replaces duplicated TypeScript parsing logic with shared F# inNapper.Core. 14 integration tests over real JSON-RPC stdio.Details
New Napper.Core modules (shared by CLI and LSP):
CurlGenerator.fs— generates curl commands fromNapRequestSectionScanner.fs— finds[section]header positions for document symbolsEnvironment.detectEnvironmentNames— scans.napenv.*files, returns env namesNew LSP project (
src/Nap.Lsp/):Ionide.LanguageServerProtocoltextDocument/documentSymbol— sections for.napand.naplist(replacesextractHttpMethod,parsePlaylistStepPathsin TS)textDocument/codeLens— request section detection (replaces CodeLens TS parsing)workspace/executeCommand:napper.requestInfo— method + URL + headers (replacesparseMethodAndUrlin TS)napper.copyCurl— curl string (replaces curl generation in TS)napper.listEnvironments— env names (replacesdetectEnvironmentsin TS)Specs updated: LSP-SPEC, LSP-PLAN, IDE-EXTENSION-SPEC, IDE-EXTENSION-PLAN, ZED-EXTENSION-PLAN, Claude.md
No existing code modified. LSP is a parallel project — cutover is Phase 3 (not started).
How do the tests prove the change works
14 integration tests in
src/Nap.Lsp.Tests/— each launches the realnapper-lspbinary as a subprocess and talks JSON-RPC over stdio (the exact same protocol VSCode and Zed use):.napfile (meta, request, assert).naplistfile (meta, steps).naprequest sections.napenv.*files