vim.opt.wildignore = "__pycache__" vim.opt.wildignore:append { "*.o", "*~", "*.pyc", "*pycache*" } vim.opt.wildignore:append { "Cargo.lock", "Cargo.Bazel.lock" } vim.opt.guicursor = "" vim.opt.number = true vim.opt.relativenumber = true vim.opt.errorbells = false vim.opt.tabstop = 4 vim.opt.softtabstop = 4 vim.opt.shiftwidth = 4 vim.opt.expandtab = true vim.opt.smartindent = true vim.opt.wrap = false vim.opt.swapfile = false vim.opt.backup = false vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undofile = true vim.opt.showmode = false vim.opt.hlsearch = false vim.opt.incsearch = true vim.opt.termguicolors = true vim.opt.scrolloff = 8 vim.opt.signcolumn = "yes" vim.opt.isfname:append("@-@") -- from tj devries vim.opt.formatoptions = vim.opt.formatoptions - "o" -- O and o, don't continue comments - "a" -- Auto formatting is BAD. - "t" -- Don't auto format my code. I got linters for that. - "2" -- I'm not in gradeschool anymore + "c" -- In general, I like it when comments respect textwidth + "q" -- Allow formatting comments w/ gq + "r" -- But do continue when pressing enter. + "n" -- Indent past the formatlistpat, not underneath it. + "j" -- Auto-remove comments if possible. -- Give more space for displaying messages. vim.opt.cmdheight = 1 -- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable -- delays and poor user experience. vim.opt.updatetime = 50 -- Don't pass messages to |ins-completion-menu|. vim.opt.shortmess:append("c") vim.opt.colorcolumn = "80" vim.g.mapleader = " " vim.g.maplocalleader = ' '