diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2024-05-23 13:56:00 +0300 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-30 12:29:57 +0200 |
| commit | 08297376a85a1719518507e54fca9de954d2376a (patch) | |
| tree | 3b9c58304b40248533bbb2bb5b7bad2da9da1ff0 /home/nvim/options.lua | |
| parent | 75c2af4aedd2ac5c2cfc74b346625fa4b265541d (diff) | |
| download | nixos-08297376a85a1719518507e54fca9de954d2376a.tar.zst | |
Agenix configuration
Diffstat (limited to 'home/nvim/options.lua')
| -rw-r--r-- | home/nvim/options.lua | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/home/nvim/options.lua b/home/nvim/options.lua new file mode 100644 index 0000000..ee2fac2 --- /dev/null +++ b/home/nvim/options.lua @@ -0,0 +1,93 @@ +vim.opt.title = true -- set the title of window to the value of the titlestring +vim.opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to +vim.g.have_nerd_fonts = true +vim.o.shell = "fish" +vim.o.fileencoding = "utf-8" +vim.opt.conceallevel = 0 +vim.opt.clipboard:append("unnamedplus") -- copy & paste +vim.o.termguicolors = true -- Enable GUI colors for the terminal to get truecolor +vim.o.mouse = "a" -- turn on mouse interaction +vim.o.signcolumn = "yes" +vim.o.guicursor = table.concat({ + "n-v-c:block-Cursor/lCursor-blinkwait1000-blinkon100-blinkoff100", + "i-ci:ver25-Cursor/lCursor-blinkwait1000-blinkon100-blinkoff100", + "r:hor50-Cursor/lCursor-blinkwait100-blinkon100-blinkoff100", +}, ",") + +vim.opt.completeopt = { "menu", "menuone", "noselect", "noinsert", "preview" } -- completion options +vim.opt.shortmess:append("c") +vim.o.updatetime = 100 -- CursorHold interval +vim.opt.wrap = true +vim.opt.linebreak = true +vim.opt.breakindent = true +vim.opt.inccommand = "split" +vim.opt.virtualedit = "block" +vim.opt.grepprg = "rg --vimgrep" +vim.opt.grepformat = "%f:%l:%c:%m" +vim.o.textwidth = 100 +vim.o.tabstop = 4 +vim.o.softtabstop = 4 +vim.o.shiftwidth = 4 +vim.o.expandtab = true +vim.o.smartindent = true +vim.opt.smartcase = true +vim.o.shiftwidth = 4 +vim.o.autoindent = true +vim.o.smarttab = true -- <tab>/<BS> indent/dedent in leading whitespace +vim.o.list = true -- show hidden characters by default +vim.opt.hidden = true -- required to keep multiple buffers and open multiple buffers + +vim.o.undofile = true +vim.o.undodir = "/home/petri/.config/nvim/undo/" +vim.o.backupdir = "/home/petri/.config/nvim/backup/" +vim.o.directory = "/home/petri/.config/nvim//swp/" + +vim.o.number = true -- show line numbers +vim.o.showmode = false -- we are already showing mode +vim.o.relativenumber = true -- relative line numbers +vim.o.hlsearch = true -- highlighted search results +vim.o.incsearch = true -- incremental search +vim.o.ignorecase = true -- ignore case sensetive while searching +vim.o.colorcolumn = "100" +vim.o.cursorline = true -- highlight current line +vim.opt.showmatch = true -- show matching bracket +vim.opt.matchtime = 2 -- how long to show matching bracket +vim.opt.pumblend = 10 -- popup menu transparency +vim.opt.winblend = 0 +vim.opt.winborder = "rounded" +vim.opt.synmaxcol = 300 + +vim.opt.swapfile = false +vim.opt.autoread = true +vim.opt.path:append("**") -- include subdirectories in search +vim.opt.selection = "exclusive" -- Selection behavior +vim.opt.showtabline = 2 -- show when multiple open + +vim.opt.foldmethod = "syntax" +vim.opt.foldlevel = 99 -- Start with all folds open +vim.opt.foldenable = true -- Enable folding + +vim.opt.scrolloff = 8 +vim.opt.sidescrolloff = 8 + +vim.opt.formatoptions:remove({ "c", "t" }) +vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } +vim.opt.backspace = "indent,start,eol" -- make backspace behave like normal again +vim.opt.splitbelow = true -- open horizontal splits below current window +vim.opt.splitright = true -- open vertical splits to the right of the current window +vim.opt.laststatus = 2 -- always show status line +vim.opt.wildignore = vim.opt.wildignore + "*.o,*.rej,*.so" -- patterns to ignore during file-navigation +vim.opt.lazyredraw = false -- faster scrolling + +vim.opt.spell = false +vim.opt.spelllang = "en" +vim.opt.wildmenu = true +vim.opt.wildmode = "longest:full,full" +vim.opt.wildignore:append({ "*.pyc" }) + +vim.opt.diffopt:append("linematch:60") + +vim.opt.redrawtime = 10000 +vim.opt.maxmempattern = 50000 + +vim.cmd.colorscheme("nord") |
