-- space as a leader key vim.g.mapleader = " " -- flush buffer on focus change vim.g.autowrite = "on" -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = true vim.opt.completeopt = { "popup", "menu", "menuone", "noselect" } vim.opt.mouse = "a" -- allow the mouse to be used in Nvim -- Tab vim.opt.tabstop = 2 -- number of visual spaces per TAB vim.opt.softtabstop = 2 -- number of spaces in tab when editing vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab vim.opt.expandtab = true -- tabs are spaces, mainly because of python -- UI config vim.opt.number = false -- show absolute number vim.opt.relativenumber = false -- add numbers to each line on the left side vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally vim.opt.splitbelow = true -- open new vertical split bottom vim.opt.splitright = true -- open new horizontal splits right vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint vim.opt.wrap = false -- Sets how neovim will display certain whitespace characters in the editor. -- See `:help 'list'` -- and `:help 'listchars'` vim.opt.list = true vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } -- Enable break indent -- Every wrapped line will continue visually indented (same amount of -- space as the beginning of that line), thus preserving horizontal blocks -- of text. vim.opt.breakindent = true -- Preview substitutions live, as you type! vim.opt.inccommand = "split" -- Searching vim.opt.incsearch = true -- search as characters are entered vim.opt.hlsearch = false -- do not highlight matches vim.opt.ignorecase = true -- ignore case in searches by default vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered vim.g.clipboard = "wl-copy" vim.opt.clipboard:append("unnamedplus") -- Save undo history vim.opt.undofile = true -- Off signcolumn on by default vim.opt.signcolumn = "no" -- Decrease update time vim.opt.updatetime = 250 -- Decrease mapped sequence wait time -- Displays which-key popup sooner vim.opt.timeoutlen = 300 -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 -- folds vim.opt.foldcolumn = "0" vim.opt.foldmethod = "expr" vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" vim.opt.foldtext = "" -- vim.opt.foldnestmax = 3 vim.opt.foldlevel = 99 vim.opt.foldlevelstart = 99 vim.opt.splitright = true vim.opt.splitbelow = true vim.opt.cmdheight = 0 -- do not unload closed buffer from jumplist vim.opt.jumpoptions = "" vim.diagnostic.config({ virtual_text = true, underline = true }) vim.opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" vim.cmd.packadd("cfilter")