Skip to content

Neovim release pipeline + 3 editor fixes (codelens #66, checkhealth #67, Type Health #57); Zed grammar reuse#69

Merged
abdushakoor12 merged 13 commits into
mainfrom
zed-ext-fix
May 31, 2026
Merged

Neovim release pipeline + 3 editor fixes (codelens #66, checkhealth #67, Type Health #57); Zed grammar reuse#69
abdushakoor12 merged 13 commits into
mainfrom
zed-ext-fix

Conversation

@abdushakoor12
Copy link
Copy Markdown
Collaborator

TLDR

Ships the Neovim plugin release/distribution pipeline plus three editor bug fixes — a 0.13-safe code-lens path (#66), a :checkhealth fix that honors the configured binary_path (#67), and a VS Code Type Health empty-workspace state (#57) — and reuses Zed's built-in Python grammar instead of compiling one.

What Was Added?

  • Neovim release pipeline — new publish-nvim job in .github/workflows/release.yml that, on each vX.Y.Z tag, mirrors the basilisk.nvim/ subtree to the standalone install repo Nimblesite/basilisk.nvim and tags it with the same tag. Uses the existing publish-homebrew/publish-scoop write convention (x-access-token + BREW_SCOOP_PAT, commit as github-actions[bot]). Documented in the new docs/plans/NEOVIM-RELEASE-PLAN.md.
  • Shared Neovim code-lens modulebasilisk.nvim/lua/basilisk/codelens.lua exposing activate(bufnr), the single version-compatible entry point for turning on code lens.
  • Testsbasilisk.nvim/tests/lsp/codelens_spec.lua, basilisk.nvim/tests/lsp/health_spec.lua, and a new [EXTACT-HEALTH] suite in vscode-extension/src/test/suite/activity-panel.test.ts.
  • Docs/plansdocs/plans/EXTENSION-ACTIVITY-PANEL-ACTIONS-PLAN.md, examples/uv.lock.

What Was Changed or Deleted?

  • Neovim code lens (issue basilisk.nvim: deprecated vim.lsp.codelens.refresh() spams warning on nvim 0.12, breaks on 0.13 #66)ftplugin/python.lua now calls basilisk.codelens.activate() instead of the deprecated vim.lsp.codelens.refresh(). The module prefers vim.lsp.codelens.enable() on Neovim 0.12+ (which installs its own debounced refresh autocmds) and falls back to refresh() + the manual BufEnter/InsertLeave loop only on 0.10/0.11. A buffer-local basilisk_did_ftplugin guard prevents repeated FileType events from registering duplicate LspAttach handlers (the builtin b:did_ftplugin guard cannot, since our ftplugin runs earlier on the runtimepath and Vim unlets it per event).
  • Neovim distribution — install instructions across NEOVIM-SPEC.md and doc/basilisk.txt point at Nimblesite/basilisk.nvim (was basilisk-lang/basilisk.nvim) and add a vim.pack (Neovim 0.12+) install path.
  • Zed grammar reusebasilisk-zed/extension.toml removes the [grammars.python] block so Zed reuses its built-in tree-sitter-python grammar instead of compiling from source (which pulls the ~400 MB wasi-sdk toolchain and can fail with failed to compile grammar 'python' / No space left on device). Also migrates [[slash_commands]] array-of-tables entries to [slash_commands.<name>] table syntax.
  • Neovim checkhealth (issue basilisk.nvim: :checkhealth ignores configured binary_path, reports false 'binary not found' #67)health.lua now forwards the configured binary_path to binary.resolve() (it previously called resolve() with no argument), so :checkhealth basilisk no longer falsely reports "binary not found" for a binary set via setup({ binary_path = ... }).
  • VS Code Type Health (issue Type Health shows "100% — 0/0 symbols" when there are no Python files #57)SummaryItem (now exported) renders No Python files found with a neutral info icon when totalFiles === 0, instead of a misleading 100% coverage bar and green "pass" icon for 0/0 symbols.
  • Examplesexamples/*.py updated to add explicit Any parameter annotations and -> None returns; regenerated mutation_testing/ report. (CLI/benchmark/zed test fixtures were left at their canonical error-triggering form — an autofix pass that had mangled them is reverted in this branch so cli_binary_tests keep asserting real E0001/E0002 output.)

How Do The Automated Tests Prove It Works?

  • Local make ci status: Rust (1829+ tests, PEP conformance, coverage threshold), Zed (96 tests), and Rust + VS Code lint all pass. The VSIX and Neovim e2e phases failed only on local-environment issues — a broken VS Code 1.122.1 test download (@vscode/policy-watcher missing) and a nondeterministic nvim child SIGTERM under load — not on any branch code; all nvim/health/codelens assertions pass. CI runners are the gate for those e2e phases.
  • codelens_spec.lua — three cases: (1) "prefers vim.lsp.codelens.enable over deprecated refresh on Neovim 0.12+" asserts enable(true,{bufnr}) is called exactly once and refresh never; (2) "falls back to refresh on 0.10/0.11 where enable is absent"; (3) "registers its LspAttach handler only once when the filetype is set repeatedly" asserts a single LspAttach autocmd / single activation after two FileType events. The ui_spec.lua real-LSP code-lens test now routes through basilisk.codelens.activate so it stays green on 0.13.
  • activity-panel.test.ts [EXTACT-HEALTH] — "empty workspace shows 'No Python files found', never a 100% bar" (asserts no % and no / bar glyphs), "empty workspace uses a neutral info icon, not a green pass" (asserts iconPath.id === "info"), and "measured workspace still renders the coverage bar and percentage" (asserts 85%, 17/20, and ).
  • health_spec.lua [issue #67] — stubs the resolver so the binary is reachable only via the configured path, then asserts :checkhealth "does not report 'binary not found' when binary_path is configured" and "reports the configured binary as found".

Spec / Doc Changes

  • NEOVIM-SPEC.md — version-compatible Code Lens API row; new {#NVIM-DISTRIBUTION-RELEASE} (mirror + tag-only versioning).
  • ZED-SPEC.md — new {#ZED-GRAMMAR} section documenting built-in grammar reuse.
  • EXTENSION-ACTIVITY-PANEL-SPEC.md — empty-workspace [EXTACT-HEALTH] rule and action-affordance sections.
  • New plans: NEOVIM-RELEASE-PLAN.md, EXTENSION-ACTIVITY-PANEL-ACTIONS-PLAN.md; docs/INDEX.md and NEOVIM-PLAN.md updated.

Breaking Changes

  • None — behavioural fixes only; the new code-lens path is version-gated and falls back on older Neovim. The Neovim install repo moves to Nimblesite/basilisk.nvim (docs updated accordingly).

Closes #66. Closes #57. Closes #67.

abdushakoor12 and others added 13 commits May 30, 2026 16:49
- Remove [grammars.python] block to avoid wasi-sdk (~400 MB) download and
  'failed to compile grammar' errors on disk-constrained systems.
- Switch from [[slash_commands]] arrays to [slash_commands.name] maps for
  Zed's current extension.toml schema.
- Update ZED-SPEC.md with Grammar Reuse section and corrected checklist.
Document how to ship basilisk.nvim: subtree-mirror the in-tree plugin to
a standalone installable repo, tag-synced to monorepo releases, with
LuaRocks/nvim-lspconfig as optional secondary channels. Register in
docs/INDEX.md.
…nstall path

Cite runtime/doc/{repeat,usr_05,pack}.txt confirming Neovim has no
marketplace, loads on-disk dirs, requires the plugin at the repo root
(no subdir install), and generates helptags at install time. Note
vim.pack.add() clones a whole repo and selects versions by tag/semver,
reinforcing the subtree-mirror + tag-based versioning approach, and add
a vim.pack install snippet.
Add a publish-nvim job to release.yml that, on each vX.Y.Z tag,
git-subtree-splits basilisk.nvim/ to the standalone Nimblesite/basilisk.nvim
mirror (the repo users install) — tagging it with the identical version so
the plugin and the binary binary.lua auto-downloads stay coupled, and
advancing the mirror's main only for stable tags.

Document the mechanism in NEOVIM-SPEC.md [NVIM-DISTRIBUTION-RELEASE], fix the
basilisk-lang -> Nimblesite org-name inconsistency across the spec, help doc,
and plan, and add a vim.pack.add() install path. Versioning is tag-only.
The Type Health panel rendered "██████████ 100% — 0/0 symbols" with a green "pass" icon for a workspace with no Python files, misleadingly reading as perfectly typed. SummaryItem now branches on totalFiles === 0 to render an explicit "No Python files found" state with a neutral info icon.

Adds a red→green regression test and documents the requirement under EXTACT-HEALTH. Fixes #57.
Rework the publish-nvim job to match publish-homebrew/publish-scoop
exactly: reuse BREW_SCOOP_PAT, clone the Nimblesite/basilisk.nvim mirror
via the x-access-token credential, replace its content with the
basilisk.nvim/ tree, commit as github-actions[bot] with a
'basilisk ${VERSION}' message (skip-if-unchanged), and push. Drop the
git subtree split approach (no fetch-depth:0, no extra tooling).

Keep one nvim-specific step the formula/manifest publishers don't need:
push the matching vX.Y.Z git tag so version-pinned installs
(vim.pack/lazy.nvim) resolve. Update NEOVIM-SPEC.md and the release plan
to describe the convention.
vim.lsp.codelens.refresh() is deprecated on Neovim 0.12 (warns on every
Python LSP attach) and removed on 0.13 (code lens stops working). Centralize
version-compatible activation in basilisk.codelens.activate(), preferring
vim.lsp.codelens.enable() on 0.12+ and falling back to refresh() plus the
manual BufEnter/InsertLeave loop only on 0.10/0.11 where enable() is absent.

- ftplugin/python.lua: call the shared module; add a buffer-local
  basilisk_did_ftplugin guard so repeated FileType events don't register
  duplicate LspAttach handlers (the builtin b:did_ftplugin guard can't, since
  our ftplugin runs earlier on the runtimepath and Vim unlets it per event).
- ui_spec.lua: route the code-lens test through the module so it stays green
  on 0.13 instead of calling the removed refresh() directly.
- NEOVIM-SPEC.md: document the version-compatible Code Lens API.
- codelens_spec.lua: regression tests for API preference, 0.10/0.11 fallback,
  and single handler registration.

Fixes #66
The "Ci prep" autofix pass (a051dd3) annotated the error-test fixtures with
`: Any` / `-> None`, which suppresses the BSK-E0001/E0002 diagnostics that
crates/basilisk-cli/tests/cli_binary_tests.rs asserts. That broke 11 CLI tests
(missing error codes, wrong exit code, absent ANSI error labels). No test code
changed, so restoring these fixtures to their canonical error-triggering form
(matching main) is the correct fix.

Restores 30 basilisk-cli fixtures, 2 benchmark fixtures, and 1 zed fixture.
Example files are intentionally left as-is.
:checkhealth basilisk called binary.resolve() with no argument, skipping the
resolver's first cascade step (the binary_path from setup()). A binary set only
via setup({ binary_path = ... }) — and used by the LSP all session — was falsely
reported as "basilisk binary not found". Forward the configured path, mirroring
the resolve(config.binary_path) call in lsp.lua.

Adds tests/lsp/health_spec.lua: stubs the resolver so the binary is reachable
only via the configured path, then asserts checkhealth reports it as found
rather than missing.

Fixes #67
The ci-prep autofix neutralized the deliberate diagnostics in the
examples/ showcases (added : Any/-> None, annotated empty dicts,
stripped redundant/override annotations), contradicting their inline
# BSK-Exxxx / # W0050 comments and examples/README.md, and breaking
ruff format --check in CI's Lint job. Restore all ten to their
known-good main versions.
@abdushakoor12 abdushakoor12 merged commit 19d336e into main May 31, 2026
12 checks passed
@abdushakoor12 abdushakoor12 deleted the zed-ext-fix branch May 31, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants