Skip to content

Instantly share code, notes, and snippets.

View vollowx's full-sized avatar
💖
aria-activedescendant="life"

Vollow vollowx

💖
aria-activedescendant="life"
View GitHub Profile
@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active January 21, 2026 05:17
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)