my dotfiles for arch
at main 97 lines 2.2 kB view raw
1vim.g.mapleader = " " 2vim.g.maplocalleader = " " 3 4vim.opt.nu = true 5vim.opt.relativenumber = true 6 7vim.opt.tabstop = 2 8vim.opt.softtabstop = 2 9vim.opt.shiftwidth = 2 10 11vim.opt.expandtab = false 12 13vim.opt.smartindent = true 14 15vim.opt.swapfile = false 16vim.opt.backup = false 17vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" 18vim.opt.undofile = true 19 20vim.opt.hlsearch = false 21vim.opt.incsearch = true 22 23vim.opt.termguicolors = true 24 25vim.opt.scrolloff = 8 26 27vim.opt.updatetime = 50 28 29vim.opt.ignorecase = true 30vim.opt.smartcase = true 31 32-- vim.opt.colorcolumn = "80" 33 34vim.opt.inccommand = "nosplit" 35 36vim.opt.cursorline = true 37 38vim.g.have_nerd_font = true 39 40-- Enable mouse mode, can be useful for resizing splits for example! 41vim.o.mouse = "a" 42 43-- Don't show the mode, since it's already in the status line 44vim.o.showmode = false 45 46-- Enable break indent 47vim.o.breakindent = true 48 49-- Save undo history 50vim.o.undofile = true 51 52-- Keep signcolumn on by default 53vim.o.signcolumn = "yes" 54 55-- Decrease update time 56-- vim.o.updatetime = 250 57 58-- Decrease mapped sequence wait time 59vim.o.timeoutlen = 300 60 61-- Configure how new splits should be opened 62vim.o.splitright = true 63vim.o.splitbelow = true 64 65-- Sets how neovim will display certain whitespace characters in the editor. 66-- See `:help 'list'` 67-- and `:help 'listchars'` 68-- 69-- Notice listchars is set using `vim.opt` instead of `vim.o`. 70-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables. 71-- See `:help lua-options` 72-- and `:help lua-options-guide` 73vim.o.list = true 74vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "" } 75 76-- Preview substitutions live, as you type! 77vim.o.inccommand = "split" 78 79-- Show which line your cursor is on 80vim.o.cursorline = true 81 82-- Minimal number of screen lines to keep above and below the cursor. 83vim.o.scrolloff = 10 84 85-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), 86-- instead raise a dialog asking if you wish to save the current file(s) 87-- See `:help 'confirm'` 88vim.o.confirm = true 89 90-- vim.o.winborder = "rounded" 91 92-- Highlight text on yank 93vim.api.nvim_create_autocmd("TextYankPost", { 94 callback = function() 95 vim.highlight.on_yank({ timeout = 100 }) 96 end, 97})