Skip to content

Instantly share code, notes, and snippets.

@al-maisan
Last active March 10, 2026 09:08
Show Gist options
  • Select an option

  • Save al-maisan/c4e47c58397c7bc5f3fa21b7bf660521 to your computer and use it in GitHub Desktop.

Select an option

Save al-maisan/c4e47c58397c7bc5f3fa21b7bf660521 to your computer and use it in GitHub Desktop.
Neovim init.lua changes — 2026-03-05

Neovim init.lua changes — 2026-03-05

Neovim init.lua Changes — 2026-03-05

All changes made to ~/.config/nvim/init.lua during this session.

Colorscheme

Replaced folke/tokyonight.nvim (tokyonight-night) with RRethy/base16-nvim (base16-one-light — subdued light theme based on Atom One Light).

Treesitter

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.

Options

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)

Keybindings

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)
<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>gd :DiffviewOpen Git diff all files against HEAD
<space>gh :DiffviewFileHistory % Git commit history for current file

Commands

Command Action
:Vrc Open ~/.config/nvim/init.lua

blink.cmp (completion plugin)

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

New Plugins

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.)

Diff Colors

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.

Terminal Title

Set terminal title to NVIM via vim.o.title = true and vim.o.titlestring = 'NVIM'.

LSP Servers

Added to the servers table (user change):

  • gopls
  • pyright
  • rust_analyzer
  • stylua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment