From e864d47eca98057890b356fc500f0cab05dc44f5 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Mon, 21 Sep 2026 14:37:21 +0200 Subject: Mark fix-mason-installer-deps tasks done, sync specs, archive change Manual verification (nix flake check, home-manager switch, Mason reinstall) confirmed on a Nix-capable host. Synced the new editor-toolchain capability into main specs and archived the change. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01BBSd4VBfoKHjE1HR3P8kmn --- .../.openspec.yaml | 2 + .../proposal.md | 39 +++++++++++++++++++ .../specs/editor-toolchain/spec.md | 43 +++++++++++++++++++++ .../2026-09-21-fix-mason-installer-deps/tasks.md | 20 ++++++++++ .../fix-mason-installer-deps/.openspec.yaml | 2 - .../changes/fix-mason-installer-deps/proposal.md | 39 ------------------- .../specs/editor-toolchain/spec.md | 43 --------------------- openspec/changes/fix-mason-installer-deps/tasks.md | 20 ---------- openspec/specs/editor-toolchain/spec.md | 45 ++++++++++++++++++++++ 9 files changed, 149 insertions(+), 104 deletions(-) create mode 100644 openspec/changes/archive/2026-09-21-fix-mason-installer-deps/.openspec.yaml create mode 100644 openspec/changes/archive/2026-09-21-fix-mason-installer-deps/proposal.md create mode 100644 openspec/changes/archive/2026-09-21-fix-mason-installer-deps/specs/editor-toolchain/spec.md create mode 100644 openspec/changes/archive/2026-09-21-fix-mason-installer-deps/tasks.md delete mode 100644 openspec/changes/fix-mason-installer-deps/.openspec.yaml delete mode 100644 openspec/changes/fix-mason-installer-deps/proposal.md delete mode 100644 openspec/changes/fix-mason-installer-deps/specs/editor-toolchain/spec.md delete mode 100644 openspec/changes/fix-mason-installer-deps/tasks.md create mode 100644 openspec/specs/editor-toolchain/spec.md (limited to 'openspec') diff --git a/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/.openspec.yaml b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/.openspec.yaml new file mode 100644 index 0000000..563fab5 --- /dev/null +++ b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-09-21 diff --git a/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/proposal.md b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/proposal.md new file mode 100644 index 0000000..5734f55 --- /dev/null +++ b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/proposal.md @@ -0,0 +1,39 @@ +## Why + +`mason.nvim` (managed by the externally-owned, Stow-linked Neovim dotfiles config) +fails to install several LSP/tooling packages on this flake's Home Manager profile: +`pyright`, `bash-language-server`, `yaml-language-server`, +`typescript-language-server`, `css-lsp`, and `html-lsp` fail because `npm` is not on +`PATH`; `debugpy` fails because no `python3`/`python` is on `PATH`; `terraform-ls` +fails because `unzip` is not on `PATH`. `programs.neovim.withPython3 = true` only +wires up Neovim's Python *provider* (pynvim) and does not put a `python3` binary on +`PATH`, so it does not cover this. `js-debug-adapter` and `lua-language-server` +already install successfully and need no change. + +## What Changes + +- Provision `nodejs` (for `npm`), `python3`, and `unzip` on `PATH` via the shared + Home Manager profile, so `mason.nvim`'s installers can find the interpreters/tools + they shell out to. + +## Capabilities + +### New Capabilities +- `editor-toolchain`: The shared home-manager profile provisions the runtime + toolchain (interpreters, package managers, archive tools) that the externally + Stow-managed Neovim/mason.nvim config depends on to install and run LSP servers + and debug adapters, without home-manager owning any of that config itself. + +### Modified Capabilities +(none — `developer-environment` covers general most-used CLI tools, not the +Neovim/mason.nvim dependency contract, so a new capability is used instead of +overloading that one.) + +## Impact + +- `modules/home/editor.nix`: extend the existing `home.packages` list (already used + for `tree-sitter`/`stdenv.cc`, the same "tools the dotfiles-owned nvim config + needs" pattern) with `nodejs`, `python3`, `unzip`. +- Applies to both Home Manager configs that import this module — `tom@linux` and + `tom@darwin` (per `flake.nix`) — covering all supported systems. +- No changes to the externally-managed dotfiles/Neovim Lua config itself. diff --git a/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/specs/editor-toolchain/spec.md b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/specs/editor-toolchain/spec.md new file mode 100644 index 0000000..8298fbd --- /dev/null +++ b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/specs/editor-toolchain/spec.md @@ -0,0 +1,43 @@ +## Purpose + +Provisions, via the shared home-manager profile, the runtime toolchain that the +externally Stow-managed Neovim/mason.nvim config depends on to install and run LSP +servers, formatters, and debug adapters — without home-manager owning that editor +config itself. + +## ADDED Requirements + +### Requirement: mason.nvim installer dependencies are provisioned +The shared home-manager profile SHALL include a Node.js runtime (providing `npm`), a +Python 3 interpreter (providing `python3`), and `unzip` on `PATH`, so that +`mason.nvim`'s package installers can locate the tools they shell out to. + +#### Scenario: npm-based Mason package installs successfully +- **WHEN** the shared home profile is activated and `mason.nvim` installs an + npm-based package (for example an LSP server distributed via npm) +- **THEN** `mason.nvim`'s installer finds `npm` on `PATH` and the installation does + not fail with an `ENOENT`/"could not find executable" error for `npm` + +#### Scenario: Python-based Mason package installs successfully +- **WHEN** the shared home profile is activated and `mason.nvim` installs a + Python-based package (for example `debugpy`) +- **THEN** `mason.nvim`'s installer finds a `python3` interpreter on `PATH` and the + installation does not fail with a "no python3 installation found" error + +#### Scenario: Archive-based Mason package installs successfully +- **WHEN** the shared home profile is activated and `mason.nvim` installs a package + distributed as a zip archive (for example `terraform-ls`) +- **THEN** `mason.nvim`'s installer finds `unzip` on `PATH` and the installation does + not fail with an `ENOENT`/"could not find executable" error for `unzip` + +### Requirement: Editor toolchain packages do not manage editor configuration +Packages provisioned by this capability SHALL supply only the underlying +interpreters/tools that the externally-managed Neovim dotfiles config depends on; +this capability SHALL NOT generate, own, or otherwise manage any Neovim +configuration file (for example `init.lua` or plugin/LSP configuration). + +#### Scenario: No competing Neovim configuration is generated +- **WHEN** the shared home profile provisions the editor toolchain packages +- **THEN** no Neovim configuration file is created or managed by this capability — + the externally Stow-managed dotfiles config remains the sole owner of that + configuration diff --git a/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/tasks.md b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/tasks.md new file mode 100644 index 0000000..2829440 --- /dev/null +++ b/openspec/changes/archive/2026-09-21-fix-mason-installer-deps/tasks.md @@ -0,0 +1,20 @@ +## 1. Provision editor toolchain packages + +- [x] 1.1 In `modules/home/editor.nix`, add `nodejs`, `python3`, and `unzip` to the + existing `home.packages` list (alongside `tree-sitter`/`stdenv.cc`), with a + short comment noting they're required by `mason.nvim`'s installers; verify by + reading the file back and confirming the three entries are present. +- [x] 1.2 Verify the flake still evaluates: run `nix flake check` and confirm it + succeeds. + +## 2. Verify Mason installs succeed + +- [x] 2.1 Apply the profile on an affected host (`home-manager switch --flake + .#tom@linux` or `.#tom@darwin`, whichever is reachable) and confirm the + activation completes without error. +- [x] 2.2 In Neovim, delete `~/.local/state/nvim/mason.log` (or run `:MasonUninstallAll` + then reinstall), trigger installation of the previously-failing packages + (`pyright`, `bash-language-server`, `debugpy`, `terraform-ls`, + `yaml-language-server`, `typescript-language-server`, `css-lsp`, `html-lsp`), + and confirm `:Mason` reports them all installed with no `npm`/`python3`/`unzip` + "could not find executable" errors in the new log. diff --git a/openspec/changes/fix-mason-installer-deps/.openspec.yaml b/openspec/changes/fix-mason-installer-deps/.openspec.yaml deleted file mode 100644 index 563fab5..0000000 --- a/openspec/changes/fix-mason-installer-deps/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-09-21 diff --git a/openspec/changes/fix-mason-installer-deps/proposal.md b/openspec/changes/fix-mason-installer-deps/proposal.md deleted file mode 100644 index 5734f55..0000000 --- a/openspec/changes/fix-mason-installer-deps/proposal.md +++ /dev/null @@ -1,39 +0,0 @@ -## Why - -`mason.nvim` (managed by the externally-owned, Stow-linked Neovim dotfiles config) -fails to install several LSP/tooling packages on this flake's Home Manager profile: -`pyright`, `bash-language-server`, `yaml-language-server`, -`typescript-language-server`, `css-lsp`, and `html-lsp` fail because `npm` is not on -`PATH`; `debugpy` fails because no `python3`/`python` is on `PATH`; `terraform-ls` -fails because `unzip` is not on `PATH`. `programs.neovim.withPython3 = true` only -wires up Neovim's Python *provider* (pynvim) and does not put a `python3` binary on -`PATH`, so it does not cover this. `js-debug-adapter` and `lua-language-server` -already install successfully and need no change. - -## What Changes - -- Provision `nodejs` (for `npm`), `python3`, and `unzip` on `PATH` via the shared - Home Manager profile, so `mason.nvim`'s installers can find the interpreters/tools - they shell out to. - -## Capabilities - -### New Capabilities -- `editor-toolchain`: The shared home-manager profile provisions the runtime - toolchain (interpreters, package managers, archive tools) that the externally - Stow-managed Neovim/mason.nvim config depends on to install and run LSP servers - and debug adapters, without home-manager owning any of that config itself. - -### Modified Capabilities -(none — `developer-environment` covers general most-used CLI tools, not the -Neovim/mason.nvim dependency contract, so a new capability is used instead of -overloading that one.) - -## Impact - -- `modules/home/editor.nix`: extend the existing `home.packages` list (already used - for `tree-sitter`/`stdenv.cc`, the same "tools the dotfiles-owned nvim config - needs" pattern) with `nodejs`, `python3`, `unzip`. -- Applies to both Home Manager configs that import this module — `tom@linux` and - `tom@darwin` (per `flake.nix`) — covering all supported systems. -- No changes to the externally-managed dotfiles/Neovim Lua config itself. diff --git a/openspec/changes/fix-mason-installer-deps/specs/editor-toolchain/spec.md b/openspec/changes/fix-mason-installer-deps/specs/editor-toolchain/spec.md deleted file mode 100644 index 8298fbd..0000000 --- a/openspec/changes/fix-mason-installer-deps/specs/editor-toolchain/spec.md +++ /dev/null @@ -1,43 +0,0 @@ -## Purpose - -Provisions, via the shared home-manager profile, the runtime toolchain that the -externally Stow-managed Neovim/mason.nvim config depends on to install and run LSP -servers, formatters, and debug adapters — without home-manager owning that editor -config itself. - -## ADDED Requirements - -### Requirement: mason.nvim installer dependencies are provisioned -The shared home-manager profile SHALL include a Node.js runtime (providing `npm`), a -Python 3 interpreter (providing `python3`), and `unzip` on `PATH`, so that -`mason.nvim`'s package installers can locate the tools they shell out to. - -#### Scenario: npm-based Mason package installs successfully -- **WHEN** the shared home profile is activated and `mason.nvim` installs an - npm-based package (for example an LSP server distributed via npm) -- **THEN** `mason.nvim`'s installer finds `npm` on `PATH` and the installation does - not fail with an `ENOENT`/"could not find executable" error for `npm` - -#### Scenario: Python-based Mason package installs successfully -- **WHEN** the shared home profile is activated and `mason.nvim` installs a - Python-based package (for example `debugpy`) -- **THEN** `mason.nvim`'s installer finds a `python3` interpreter on `PATH` and the - installation does not fail with a "no python3 installation found" error - -#### Scenario: Archive-based Mason package installs successfully -- **WHEN** the shared home profile is activated and `mason.nvim` installs a package - distributed as a zip archive (for example `terraform-ls`) -- **THEN** `mason.nvim`'s installer finds `unzip` on `PATH` and the installation does - not fail with an `ENOENT`/"could not find executable" error for `unzip` - -### Requirement: Editor toolchain packages do not manage editor configuration -Packages provisioned by this capability SHALL supply only the underlying -interpreters/tools that the externally-managed Neovim dotfiles config depends on; -this capability SHALL NOT generate, own, or otherwise manage any Neovim -configuration file (for example `init.lua` or plugin/LSP configuration). - -#### Scenario: No competing Neovim configuration is generated -- **WHEN** the shared home profile provisions the editor toolchain packages -- **THEN** no Neovim configuration file is created or managed by this capability — - the externally Stow-managed dotfiles config remains the sole owner of that - configuration diff --git a/openspec/changes/fix-mason-installer-deps/tasks.md b/openspec/changes/fix-mason-installer-deps/tasks.md deleted file mode 100644 index 2d2d259..0000000 --- a/openspec/changes/fix-mason-installer-deps/tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -## 1. Provision editor toolchain packages - -- [x] 1.1 In `modules/home/editor.nix`, add `nodejs`, `python3`, and `unzip` to the - existing `home.packages` list (alongside `tree-sitter`/`stdenv.cc`), with a - short comment noting they're required by `mason.nvim`'s installers; verify by - reading the file back and confirming the three entries are present. -- [ ] 1.2 Verify the flake still evaluates: run `nix flake check` and confirm it - succeeds. - -## 2. Verify Mason installs succeed - -- [ ] 2.1 Apply the profile on an affected host (`home-manager switch --flake - .#tom@linux` or `.#tom@darwin`, whichever is reachable) and confirm the - activation completes without error. -- [ ] 2.2 In Neovim, delete `~/.local/state/nvim/mason.log` (or run `:MasonUninstallAll` - then reinstall), trigger installation of the previously-failing packages - (`pyright`, `bash-language-server`, `debugpy`, `terraform-ls`, - `yaml-language-server`, `typescript-language-server`, `css-lsp`, `html-lsp`), - and confirm `:Mason` reports them all installed with no `npm`/`python3`/`unzip` - "could not find executable" errors in the new log. diff --git a/openspec/specs/editor-toolchain/spec.md b/openspec/specs/editor-toolchain/spec.md new file mode 100644 index 0000000..8320e61 --- /dev/null +++ b/openspec/specs/editor-toolchain/spec.md @@ -0,0 +1,45 @@ +# editor-toolchain Specification + +## Purpose + +Provisions, via the shared home-manager profile, the runtime toolchain that the +externally Stow-managed Neovim/mason.nvim config depends on to install and run LSP +servers, formatters, and debug adapters — without home-manager owning that editor +config itself. + +## Requirements + +### Requirement: mason.nvim installer dependencies are provisioned +The shared home-manager profile SHALL include a Node.js runtime (providing `npm`), a +Python 3 interpreter (providing `python3`), and `unzip` on `PATH`, so that +`mason.nvim`'s package installers can locate the tools they shell out to. + +#### Scenario: npm-based Mason package installs successfully +- **WHEN** the shared home profile is activated and `mason.nvim` installs an + npm-based package (for example an LSP server distributed via npm) +- **THEN** `mason.nvim`'s installer finds `npm` on `PATH` and the installation does + not fail with an `ENOENT`/"could not find executable" error for `npm` + +#### Scenario: Python-based Mason package installs successfully +- **WHEN** the shared home profile is activated and `mason.nvim` installs a + Python-based package (for example `debugpy`) +- **THEN** `mason.nvim`'s installer finds a `python3` interpreter on `PATH` and the + installation does not fail with a "no python3 installation found" error + +#### Scenario: Archive-based Mason package installs successfully +- **WHEN** the shared home profile is activated and `mason.nvim` installs a package + distributed as a zip archive (for example `terraform-ls`) +- **THEN** `mason.nvim`'s installer finds `unzip` on `PATH` and the installation does + not fail with an `ENOENT`/"could not find executable" error for `unzip` + +### Requirement: Editor toolchain packages do not manage editor configuration +Packages provisioned by this capability SHALL supply only the underlying +interpreters/tools that the externally-managed Neovim dotfiles config depends on; +this capability SHALL NOT generate, own, or otherwise manage any Neovim +configuration file (for example `init.lua` or plugin/LSP configuration). + +#### Scenario: No competing Neovim configuration is generated +- **WHEN** the shared home profile provisions the editor toolchain packages +- **THEN** no Neovim configuration file is created or managed by this capability — + the externally Stow-managed dotfiles config remains the sole owner of that + configuration -- cgit v1.3