馃 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf(options): use `vim.o` where possible

robin 0cb454b3 dade2792

+39 -39
+39 -39
config/lua/ivy/config/options.lua
··· 1 - vim.opt.encoding = "utf-8" 1 + vim.o.encoding = "utf-8" 2 2 3 - vim.opt.title = true 4 - vim.opt.titlestring = '%{expand("%:p:~:.")} 路 nvim' 5 - vim.opt.errorbells = false 6 - vim.opt.mouse = "nv" 3 + vim.o.title = true 4 + vim.o.titlestring = '%{expand("%:p:~:.")} 路 nvim' 5 + vim.o.errorbells = false 6 + vim.o.mouse = "nv" 7 7 8 8 -- set space as leader 9 9 vim.g.mapleader = " " 10 10 vim.g.maplocalleader = " m" 11 11 12 - vim.opt.keywordprg = ":vertical botright help" 12 + vim.o.keywordprg = ":vertical botright help" 13 13 14 14 -- true colors 15 - vim.opt.termguicolors = true 15 + vim.o.termguicolors = true 16 16 17 17 -- line numbers 18 - vim.opt.number = true 19 - vim.opt.relativenumber = false 20 - vim.opt.numberwidth = 3 18 + vim.o.number = true 19 + vim.o.relativenumber = false 20 + vim.o.numberwidth = 3 21 21 22 - vim.opt.cursorline = true 23 - vim.opt.cursorlineopt = "both" 22 + vim.o.cursorline = true 23 + vim.o.cursorlineopt = "both" 24 24 25 25 -- scroll offsets 26 26 vim.o.scrolloff = 5 ··· 29 29 -- completion height 30 30 vim.o.pumheight = 15 31 31 vim.opt.wildoptions = { "fuzzy", "pum", "tagfile" } 32 - vim.opt.wildmode = "longest:full,full" 32 + vim.opt.wildmode = { "longest:full", "full" } 33 33 vim.opt.completeopt = { "fuzzy", "menu", "menuone", "noinsert", "preview" } 34 34 35 35 -- split directions ··· 37 37 vim.o.splitright = true 38 38 39 39 -- search settings 40 - vim.opt.incsearch = true 41 - vim.opt.hlsearch = true 40 + vim.o.incsearch = true 41 + vim.o.hlsearch = true 42 42 vim.o.ignorecase = true 43 43 vim.o.smartcase = true 44 44 -- substitution with preview window 45 - vim.opt.inccommand = "split" 45 + vim.o.inccommand = "split" 46 46 47 47 -- folding 48 - vim.opt.foldenable = false 49 - vim.opt.foldlevelstart = 0 50 - vim.opt.foldnestmax = 4 51 - -- vim.opt.foldmethod = 'marker' 48 + vim.o.foldenable = false 49 + vim.o.foldlevelstart = 0 50 + vim.o.foldnestmax = 4 51 + -- vim.o.foldmethod = 'marker' 52 52 53 53 -- redefine word boundaries - '_' is a word separator, this helps with snake_case 54 54 vim.opt.iskeyword:remove("_") 55 55 56 56 -- allow cursor to move paste the end of the line in visual block mode 57 - vim.opt.virtualedit = "block" 57 + vim.o.virtualedit = "block" 58 58 59 59 -- indentations settings 60 60 vim.o.shiftwidth = 2 ··· 64 64 vim.o.smartindent = true 65 65 vim.o.smarttab = true 66 66 -- Enable break indent 67 - vim.opt.breakindent = true 67 + vim.o.breakindent = true 68 68 vim.o.wrap = false 69 69 70 70 -- always show 1 column of sign column (gitsigns, etc.) ··· 73 73 -- hide search notices, intro 74 74 vim.opt.shortmess:append("sI") 75 75 76 - vim.opt.formatoptions = "tcrqj" 76 + vim.o.formatoptions = "tcrqj" 77 77 78 78 -- hide extra text 79 - vim.opt.conceallevel = 2 80 - vim.opt.concealcursor = "c" 79 + vim.o.conceallevel = 2 80 + vim.o.concealcursor = "c" 81 81 82 82 -- nice font icons or something 83 83 vim.g.have_nerd_font = true 84 84 85 85 -- Decrease update time 86 - vim.opt.updatetime = 250 86 + vim.o.updatetime = 250 87 87 88 - vim.opt.timeout = false 88 + vim.o.timeout = false 89 89 -- Decrease mapped sequence wait time - displays which-key popup sooner 90 - vim.opt.timeoutlen = 0 90 + vim.o.timeoutlen = 0 91 91 92 92 -- Don't show the mode, since it's already in the status line 93 - vim.opt.showmode = false 94 - vim.opt.showcmd = false 93 + vim.o.showmode = false 94 + vim.o.showcmd = false 95 95 vim.o.showtabline = 2 96 96 vim.o.cmdheight = 0 97 97 -- global statusline 98 98 vim.o.laststatus = 3 99 99 100 100 -- use rg for grepping 101 - vim.opt.grepprg = vim.fn.executable("rg") == 1 and "rg --vimgrep" or "grep -n $* /dev/null" 102 - vim.opt.grepformat = "%f:%l:%c:%m" 101 + vim.o.grepprg = vim.fn.executable("rg") == 1 and "rg --vimgrep" or "grep -n $* /dev/null" 102 + vim.o.grepformat = "%f:%l:%c:%m" 103 103 104 104 -- let me have spelling checking for english 105 105 vim.opt.spelllang = { "en" } 106 106 vim.opt.spelloptions:append("noplainbuffer") 107 107 108 108 -- indent blank line imporvments 109 - vim.opt.list = true 109 + vim.o.list = true 110 110 111 111 vim.o.shell = os.getenv("SHELL") or "/bin/sh" 112 112 if vim.fn.has("unix") == 1 then ··· 114 114 end 115 115 116 116 -- disable swap & backup, and configure undo files 117 - vim.opt.swapfile = false 118 - vim.opt.backup = false 119 - vim.opt.undodir = vim.fn.stdpath("state") .. "/undodir" 120 - vim.opt.undofile = true 117 + vim.o.swapfile = false 118 + vim.o.backup = false 119 + vim.o.undodir = vim.fn.stdpath("state") .. "/undodir" 120 + vim.o.undofile = true 121 121 -- dont unload abandoned buffers 122 - vim.opt.hidden = true 122 + vim.o.hidden = true 123 123 124 124 ---@type { [string]: { style: string, ['vert'|'vertleft'|'vertright'|'horiz'|'horizup'|'horizdown'|'verthoriz'|'topleft'|'topright'|'botleft'|'botright']: string, bottom?: string } } 125 125 local borderchars = { ··· 230 230 verthoriz = vim.g.bc.verthoriz, 231 231 }) 232 232 233 - vim.opt.winborder = vim.g.border_style 233 + vim.o.winborder = vim.g.border_style 234 234 235 235 -- rust save 236 236 vim.g.rustfmt_autosave = 1