From c29c1f070e32ba7c97384e8a96f5ef16eb0beeae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20P=C4=99dzim=C4=85=C5=BC?= Date: Wed, 6 May 2026 09:59:46 +0200 Subject: [PATCH 1/2] fix(nvim): skip npm-based LSP servers when npm is unavailable pyright and bash-language-server install via npm in Mason; on GPU servers without Node.js this caused noisy install failures on every nvim launch. Check vim.fn.executable('npm') at config time and exclude the two servers from ensure_installed when npm is absent. --- nvim/.config/nvim/init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 1c66a4a..e44a702 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -142,13 +142,16 @@ require('lazy').setup({ -- Server configs defined once; registration method differs by nvim version. -- nvim 0.11+: vim.lsp.config/enable (new built-in API, no lspconfig on_attach) -- nvim 0.9–0.10: lspconfig.server.setup() (classic API) - local servers = { + -- pyright and bashls install via npm; skip ensure_installed on hosts without npm. + local npm_servers = vim.fn.executable('npm') == 1 and { pyright = { capabilities = capabilities, settings = { python = { analysis = { useLibraryCodeForTypes = true } } }, }, - clangd = { capabilities = capabilities }, bashls = { capabilities = capabilities }, + } or {} + local servers = vim.tbl_extend('force', { + clangd = { capabilities = capabilities }, lua_ls = { capabilities = capabilities, settings = { @@ -159,7 +162,7 @@ require('lazy').setup({ }, }, }, - } + }, npm_servers) if vim.fn.has('nvim-0.11') == 1 then require('mason-lspconfig').setup({ From 20a96dae17232a199b6a8c0a0dc02078d536d911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20P=C4=99dzim=C4=85=C5=BC?= Date: Wed, 6 May 2026 10:54:09 +0200 Subject: [PATCH 2/2] chore: release v1.5.1 - Bump VERSION to 1.5.1 - Add CHANGELOG entry for v1.5.1 - Document Mason npm-conditional LSP guard in CLAUDE.md and AGENTS.md --- AGENTS.md | 5 +++++ CHANGELOG.md | 14 ++++++++++++++ CLAUDE.md | 7 +++++++ VERSION | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index cfd0082..cb113c5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -42,6 +42,11 @@ W → w Wq/WQ → wq Wqa/WQa/WQA → wqa Q → q Qa/QA → qa Add new aliases to the `pairs({…})` table — one line, no boilerplate. +**Mason LSP servers** — `pyright` and `bash-language-server` are npm-based. +They are wrapped in `vim.fn.executable('npm') == 1` so hosts without npm (e.g. +GPU servers) skip them silently. Do not remove this guard or add new npm-dependent +servers outside of it. + ## Version bump rules - `fix:` commits → patch (`X.Y.Z+1`) diff --git a/CHANGELOG.md b/CHANGELOG.md index e049061..291e245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.5.1] - 2026-05-06 + +### Fixed +- `nvim/init.lua`: Mason no longer attempts to install `pyright` and + `bash-language-server` on hosts without npm/Node.js. Both servers use npm as + their install backend; the unconditional `ensure_installed` caused two noisy + failure messages on every Neovim launch on GPU servers. They are now guarded + behind `vim.fn.executable('npm') == 1`. Resolves #23. + +### Changed +- `CLAUDE.md`, `AGENTS.md`: documented the Mason npm-conditional LSP server + guard so agents and humans know not to remove it or add new npm-dependent + servers outside of it. + ## [1.5.0] - 2026-05-05 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index 498c881..1470531 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -292,6 +292,13 @@ common Ex commands so accidental Shift-holding doesn't fail: Add new aliases to the `pairs({…})` table at the bottom of `init.lua` — one line, no per-command boilerplate. +**Mason LSP servers** — `pyright` and `bash-language-server` are installed by +Mason via npm. The config guards them behind `vim.fn.executable('npm') == 1` so +`ensure_installed` only includes them when npm is present on the host. Hosts +without Node.js (e.g. GPU servers) still get `clangd` and `lua_ls` (no npm +needed). Do not remove this guard or add other npm-dependent servers without +wrapping them in the same check. + --- ## fzf integration diff --git a/VERSION b/VERSION index bc80560..26ca594 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.0 +1.5.1