[audit] Guard native LSP completion when blink.cmp active; drop dead <0.11 compat#282
Merged
Merged
Conversation
…<0.11 compat When blink.cmp is installed, vim.lsp.completion.enable(autotrigger=true) in LspAttach races with blink's own insert-event triggers. Guard it with `if not blink_ok` so native completion only fires when blink is absent. Also remove the unreachable nvim<0.11 fallback in LspToggle: vim.lsp.config/enable (0.11+ only) are already used throughout, so vim.lsp.stop_client() can never be reached.
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.
What
Two mechanical fixes in
lua/config/plugin_config.lua.1.
vim.lsp.completion.enableconflicts with blink.cmp (line 140)Before:
After:
Why: When blink.cmp is installed and set up, it takes over the completion pipeline and registers its own
InsertCharPre/CompleteDoneautocmds. Callingvim.lsp.completion.enable(autotrigger=true)on top of that registers a second set of competing autocmds, causing both systems to fire on every keystroke. Thepcallwrapper only prevents crashes — it does not prevent the runtime conflict. The guard makes native completion a fallback for when blink is absent.2. Dead Neovim <0.11 branch in
LspToggle(line 152)Before:
After:
Why: The entire LSP configuration already uses
vim.lsp.config/vim.lsp.enable(0.11+ only APIs), so theelsebranch (vim.lsp.stop_client) can never be reached on any Neovim version that can load this config.Generated by Claude Code