Skip to content

[audit] fix LspToggle compat guard: nvim-0.12 → nvim-0.11#276

Merged
stanfish06 merged 1 commit into
masterfrom
audit/lstoggle-stop-version-check
Jul 7, 2026
Merged

[audit] fix LspToggle compat guard: nvim-0.12 → nvim-0.11#276
stanfish06 merged 1 commit into
masterfrom
audit/lstoggle-stop-version-check

Conversation

@stanfish06

Copy link
Copy Markdown
Owner

What

client:stop() (colon-notation) has been available since Neovim 0.11, as part of the broad client-method capitalisation sweep in that release. The version gate in LspToggle was checking for nvim-0.12, which meant vim.lsp.stop_client() (deprecated in 0.12) was called unnecessarily on any 0.11.x build.

Where

lua/config/plugin_config.lua line 136

-- before
if vim.fn.has("nvim-0.12") == 1 then
-- after
if vim.fn.has("nvim-0.11") == 1 then

Why it matters

  • On Neovim 0.11, vim.lsp.stop_client() still works but is the legacy path; client:stop() is the correct modern call.
  • On Neovim 0.12+, vim.lsp.stop_client() is deprecated (confirmed in deprecated.txt for v0.12.0).
  • The one-release-late gate made the deprecated branch reachable on the newest stable Neovim.

References

Closes #263


Generated by Claude Code

client:stop() (colon-notation) landed in 0.11 as part of the client
method capitalisation wave; vim.lsp.stop_client() was deprecated in
0.12. The version check was one release too late, meaning the deprecated
fallback was called unnecessarily on 0.11.

Closes #263
@stanfish06 stanfish06 merged commit e1fc569 into master Jul 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[audit] LspToggle gates client:stop() on nvim-0.12 but the method has been available since 0.11

2 participants