Neovim init.lua changes
All changes made to ~/.config/nvim/init.lua.
Current file: init.lua
Replaced folke/tokyonight.nvim (tokyonight-night) with RRethy/base16-nvim (base16-one-light — subdued light theme based on Atom One Light).
Fixed nvim-treesitter config error (attempt to call field 'install' (a nil value)). The lazy-lock.json had a pinned commit from the archived master branch instead of main. Updated the lock file to the correct main branch commit (544320a9) where require('nvim-treesitter').install() exists.
| Setting | Value | Purpose |
|---|---|---|
vim.o.wrapscan |
false |
Don't wrap search past end of file |
vim.o.wildmode |
'list:longest' |
Tab completion: list matches, complete longest common string |
vim.o.wildmenu |
false |
Disable wildmenu (was overriding wildmode) |
vim.o.tabstop |
4 |
Tab display width of 4 columns |
listchars.tab |
' ' |
Tabs render as plain spaces (invisible) |
| Key | Action | Description |
|---|---|---|
Y |
:e#<CR> |
Switch to alternate (last edited) buffer |
<C-x> |
:bd<CR> |
Close current buffer |
<C-a> |
Telescope buffers | Find existing buffers (fuzzy picker) |
<space>so |
Telescope live grep | Grep only code files (go, rs, tf, sh, py, toml, mk, bash, sql, Makefile) |
<space>sw |
Telescope grep_string | Search word under cursor in code files only (same glob filter as <space>so) |
<C-u> |
:res +6 |
Increase split height by 6 |
<C-d> |
:res -6 |
Decrease split height by 6 |
;; |
Copy path to clipboard | Copy current buffer path (as opened) to system clipboard |
<space>sc |
Telescope commands | Search and execute Ex commands |
<Tab> (Telescope) |
Toggle selection | Mark/unmark item in Telescope results, move up |
<S-Tab> (Telescope) |
Toggle selection | Mark/unmark item in Telescope results, move down |
<M-q> (Telescope) |
Selected → quickfix | Send only selected items to quickfix list and open it (Telescope default) |
<space>gd |
:DiffviewOpen |
Git diff all files against HEAD |
<space>gh |
:DiffviewFileHistory % |
Git commit history for current file |
| Command | Action |
|---|---|
:Vrc |
Open ~/.config/nvim/init.lua |
Customized from kickstart defaults:
delay = 250— show which-key popup after 250ms (kickstart default is 0)- Trimmed spec: removed
<leader>c(Code),<leader>d(Document),<leader>r(Rename),<leader>w(Workspace) groups - Added
{ 'gr', group = 'LSP Actions', mode = { 'n' } }group - Added visual mode to
<leader>s(Search) group
Customized cmdline completion to fix wildmode conflict and improve UX:
cmdline = {
keymap = {
['<Tab>'] = { 'select_and_accept', 'fallback' },
['<C-n>'] = { 'select_next', 'fallback' },
['<C-p>'] = { 'select_prev', 'fallback' },
},
completion = {
list = { selection = { preselect = true, auto_insert = true } },
menu = { auto_show = true },
},
},- Top match auto-selected and auto-inserted
<Tab>accepts the selection (instead of<C-y>)<C-n>/<C-p>to cycle matches
Added 'buffer' to completion sources so <C-n> also completes words from the current buffer:
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},| Plugin | Purpose |
|---|---|
sindrets/diffview.nvim |
Side-by-side git diff viewer for all files, file history |
rafamadriz/friendly-snippets |
Premade snippets for many languages (Go, Rust, etc.) |
Fixed unreadable diff highlights (dark backgrounds on light theme). Added termguicolors = true and overrode DiffAdd, DiffDelete, DiffChange, DiffText with light pastel backgrounds via ColorScheme autocmd.
Set terminal title to NVIM via vim.o.title = true and vim.o.titlestring = 'NVIM'.
Added to the servers table (user change):
goplspyrightrust_analyzerstylua
<space>swrestricted to code files: Changed from barebuiltin.grep_stringto a wrapped function withglob_patternfilter matching the same file types as<space>so(*.go,*.rs,*.tf,*.sh,*.py,*.toml,*.mk,*.bash,*.sql,Makefile). Previously searched all files in the tree.- Buffer word completion: Added
'buffer'to blink.cmpsources.default(was{ 'lsp', 'path', 'snippets' }).<C-n>now also suggests words from the current buffer, not just LSP/snippets/paths. - Documentation sync: Added previously undocumented
<space>sc(search commands) keybinding and which-key customizations (delay 250ms, trimmed spec, gr LSP Actions group). - Telescope selection → quickfix: Mapped
<Tab>/<S-Tab>to toggle selection in Telescope results.<C-q>sends all results to quickfix (default),<M-q>(Alt-q) sends only selected items (also default).
- Initial setup: colorscheme, treesitter fix, options, keybindings, commands, blink.cmp cmdline config, new plugins, diff colors, terminal title, LSP servers.