diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2026-01-12 10:17:28 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2026-01-12 10:17:28 +0200 |
| commit | 9091ec72fe5ed12ae56a46f8580e0053d4b525fb (patch) | |
| tree | af7c1d6a472b8ec6a3060bd53cb2ffdb6b9221e3 /home/nvim/options.lua | |
| parent | b85d671f4977ee7b3a5a7f079d618c5449f86940 (diff) | |
| download | nixos-9091ec72fe5ed12ae56a46f8580e0053d4b525fb.tar.zst | |
Minor nvim changes
Diffstat (limited to '')
| -rw-r--r-- | home/nvim/options.lua | 84 |
1 files changed, 44 insertions, 40 deletions
diff --git a/home/nvim/options.lua b/home/nvim/options.lua index 9911824..109c9b5 100644 --- a/home/nvim/options.lua +++ b/home/nvim/options.lua @@ -1,89 +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.schedule(function() + vim.opt.clipboard = "unnamedplus" +end) + vim.g.have_nerd_fonts = true -vim.o.shell = "nushell" + vim.o.fileencoding = "utf-8" +vim.o.mouse = "a" -- turn on mouse interaction +vim.o.shell = "nushell" +vim.o.signcolumn = true +vim.o.termguicolors = true -- Enable GUI colors for the terminal to get truecolor 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.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.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.autoindent = true +vim.o.expandtab = false +vim.o.list = true -- show hidden characters by default 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.smartindent = true vim.o.smarttab = true -- <tab>/<BS> indent/dedent in leading whitespace -vim.o.list = true -- show hidden characters by default +vim.o.softtabstop = 4 +vim.o.tabstop = 4 +vim.o.textwidth = 100 +vim.o.updatetime = 100 -- CursorHold interval +vim.opt.breakindent = true +vim.opt.completeopt = { "menu", "menuone", "noselect", "noinsert", "preview" } -- completion options +vim.opt.grepformat = "%f:%l:%c:%m" +vim.opt.grepprg = "rg --vimgrep" vim.opt.hidden = true -- required to keep multiple buffers and open multiple buffers +vim.opt.inccommand = "split" +vim.opt.linebreak = true +vim.opt.shortmess:append("c") +vim.opt.smartcase = true +vim.opt.virtualedit = "block" +vim.opt.wrap = true 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.o.hlsearch = true -- highlighted search results +vim.o.ignorecase = true -- ignore case sensetive while searching +vim.o.incsearch = true -- incremental search +vim.o.number = true -- show line numbers +vim.o.relativenumber = true -- relative line numbers +vim.o.showmode = false -- we are already showing mode vim.opt.matchtime = 2 -- how long to show matching bracket vim.opt.pumblend = 10 -- popup menu transparency +vim.opt.showmatch = true -- show matching bracket +vim.opt.synmaxcol = 300 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.swapfile = false -vim.opt.foldmethod = "syntax" -vim.opt.foldlevel = 99 -- Start with all folds open vim.opt.foldenable = true -- Enable folding +vim.opt.foldlevel = 99 -- Start with all folds open +vim.opt.foldmethod = "syntax" vim.opt.scrolloff = 8 vim.opt.sidescrolloff = 8 +vim.opt.backspace = "indent,start,eol" -- make backspace behave like normal again vim.opt.formatoptions:remove({ "c", "t" }) +vim.opt.laststatus = 2 -- always show status line +vim.opt.lazyredraw = false -- faster scrolling 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.wildignore:append({ "*.pyc" }) vim.opt.wildmenu = true vim.opt.wildmode = "longest:full,full" -vim.opt.wildignore:append({ "*.pyc" }) vim.opt.diffopt:append("linematch:60") |
