Neovim Completion Cockpit

Up: Neovim Config Tutorial Down: LSP completion plugins, snippets

Completion is not just a dropdown. In this config it is a cockpit where several instruments offer signals, and each filetype gets a different panel layout.

Main Controls

blink.cmp is the engine. The config keeps the controls opinionated:

ControlBehavior
<C-l>Accept completion.
Arrow keysDisabled, so movement stays Vim-like.
Menu borderSingle border, visually quiet.
DocsAuto-show after a short delay.
Command lineCompletion is enabled for /.

Default Sources

Most buffers can draw from LSP, paths, snippets, Git, ripgrep, calculator, and emoji sources.

That mix means completion can answer different kinds of questions:

SourceQuestion it answers
LSPWhat does the language server know?
PathWhat file am I pointing at?
SnippetsWhat pattern do I write often?
GitWhat issue, PR, branch, or commit context matters?
RipgrepWhat words already exist in this project?
CalcWhat is this small expression worth?
EmojiWhat symbol belongs in this prose or issue text?

Filetype-Specific Menus

The config changes sources by context.

FiletypeCompletion bias
CommentsBuffer words only, keeping comments calmer.
Lua inside the Neovim configAdds LazyDev and Neovim Lua API knowledge.
PythonAdds notebook-related completion when enabled.
Markdown notesAvoids project-wide ripgrep in selected vault contexts to reduce noise.
Octo buffersAdds Git and emoji context.
Org filesAdds org, paths, snippets, ripgrep, emoji, and calc.
SQLAdds Dadbod database completion.
Terminal buffersPrefers paths.
DAP buffersAdds debugger completion.

Environment Keys Without Environment Leaks

ecolog.nvim helps navigate and insert environment keys. Public notes should never include real env values. The useful teaching point is the workflow, not the secrets.

-- Good public example
vim.env.DATABASE_URL = "postgres://example"

Related: snippets, debug test data plugins