Skip to content

[audit] Neovim 0.12 'autocomplete' option — review manual LspAttach autotrigger wiring #135

Closed as not planned

Description

@stanfish06

What

Neovim 0.12 ships a new 'autocomplete' option (see :help 'autocomplete') that enables automatic LSP-powered completion without any manual wiring. The current config enables automatic completion by calling vim.lsp.completion.enable() with autotrigger = true inside LspAttach:

-- lua/config/plugin_config.lua:111-113
pcall(function()
    vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end)

Where

lua/config/plugin_config.lua, lines 107–118 (the LspAttach autocmd callback).

Why it matters

Two concerns:

  1. Redundancy / conflict: Setting vim.o.autocomplete = true (the 0.12 way) and keeping autotrigger = true in vim.lsp.completion.enable() may result in double-triggering or unexpected completion menu behaviour.

  2. Future-proofing: The autotrigger argument to vim.lsp.completion.enable() is a lower-level escape hatch that predates the 'autocomplete' option. The new option is the documented, stable path going forward.

Recommended action

Evaluate whether to:

  • Replace { autotrigger = true } with vim.o.autocomplete = true set once in options.lua, and simplify the LspAttach handler to just call vim.lsp.completion.enable(true, client.id, ev.buf) (no autotrigger), OR
  • Keep the current pattern if the 'autocomplete' option behaves differently (e.g., it may only apply to keyword completion, not LSP completion — worth checking :help 'autocomplete' on 0.12).

Before changing: verify actual behaviour on the installed Neovim version with :checkhealth vim.lsp.

Activity

  1. stanfish06 commented on Jul 26, 2026

    @stanfish06
    OwnerAuthor

    Too vague to action as written, and the concrete version of this concern (native LSP completion running alongside blink.cmp) is already tracked in #243. Native completion wiring was handled in #73.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions