nvim-minimal/lua/config/options.lua
mk 97a90cc1e5 Initial commit: nvim-minimal
A small, fast, portable Neovim config built on bare lazy.nvim (no LazyVim,
no LSPs, no Mason). Vendored `based` colorscheme (GPLv3, self-authored,
derived from vim-vividchalk) so the config loads on any machine with just
nvim + git — the listed treesitter parsers ship prebuilt, so no compiler
is needed for the configured languages.

Plugins: snacks.nvim (picker/explorer/buffers), nvim-treesitter (pinned to
master for the declarative ensure_installed/highlight/indent API), blink.cmp
(buffer+path completion, prebuilt binary), lualine, gitsigns, mini.align/
comment/surround.

Personal keymaps ported: jj/jk/kj/чя escape, ж -> :, Russian langmap, arrow
disables, bracket-return expansions, gc/sa-sd-sr/gz-gZ.
2026-07-28 03:23:41 +03:00

56 lines
1.6 KiB
Lua

-- Options are set before lazy.nvim startup.
vim.opt.termguicolors = true
vim.opt.encoding = "utf8"
vim.opt.hidden = true
vim.opt.incsearch = true
vim.opt.langmap =
"ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz"
vim.opt.maxmempattern = 5000
-- completion
vim.opt.wildignorecase = true
vim.opt.smartcase = true
vim.opt.wildmenu = true
vim.opt.path:append("**")
-- `gf` will try these extensions on a bare word under the cursor.
vim.opt.suffixesadd = { ".lua", ".vim", ".md", ".json", ".ts", ".tsx", ".js", ".py", ".rs" }
vim.opt.wildignore:append("**/node_modules/**")
vim.opt.completeopt = { "menu", "menuone", "preview", "noinsert" }
-- backups and recovery
vim.opt.backup = true
vim.opt.backupdir = os.getenv("HOME") .. "/.local/state/nvim/backup"
vim.opt.swapfile = true
vim.opt.undofile = true
vim.opt.updatetime = 800
-- misc
vim.opt.wrap = false
vim.opt.whichwrap:append("<,>,[,]")
vim.opt.timeoutlen = 500
vim.opt.ttimeoutlen = 50
-- indentation/tabulation
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.expandtab = true
vim.opt.shiftwidth = 4
vim.opt.smartindent = true
vim.opt.autoindent = true
-- layout
vim.opt.signcolumn = "yes"
vim.opt.colorcolumn = { 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 80, 99 }
vim.opt.cmdheight = 1
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.scrolloff = 10
-- folds (treesitter-based; no nvim-ufo needed)
vim.opt.foldcolumn = "1"
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldenable = true
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"