Personal Nix setup
0
fork

Configure Feed

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

Update basic vim settings

+51 -10
+51 -10
modules/nvim/init.lua
··· 35 35 -- default tab options 36 36 vim.o.expandtab = true 37 37 vim.o.tabstop = 2 38 + vim.o.softtabstop = 2 38 39 vim.o.shiftwidth = 2 39 40 40 41 -- tweak redraw timings 41 42 vim.o.lazyredraw = true 42 43 vim.o.updatetime = 500 43 44 vim.o.timeoutlen = 500 44 - 45 - -- show matching brackets 46 - vim.o.showmatch = true 47 45 48 46 -- fold options 49 47 vim.o.foldenable = true ··· 69 67 vim.o.swapfile = false 70 68 71 69 -- disable matchparen 70 + vim.o.showmatch = false 72 71 vim.g.loaded_matchparen = 1 73 72 74 73 -- disable netrw ··· 76 75 vim.g.loaded_netrwPlugin = 1 77 76 78 77 -- no completion or startup messages 79 - vim.o.shortmess = vim.o.shortmess .. 'WcCI' 78 + vim.o.shortmess = vim.o.shortmess .. 'WcCIAa' 80 79 81 80 -- line numbers 82 81 vim.wo.number = true 83 82 84 83 -- char options 85 - vim.opt.fillchars:append('vert:│,horiz:─,horizdown:┬,horizup:┴,verthoriz:┼,vertleft:┤,vertright:├') 86 - vim.o.listchars = 'tab: ,extends:…,precedes:…,nbsp:␣' 84 + vim.opt.fillchars = { 85 + vert = '│', 86 + diff = '╱', 87 + horiz = '─', 88 + horizup = '┴', 89 + horizdown = '┬', 90 + vertleft = '┤', 91 + vertright = '├', 92 + verthoriz = '┼', 93 + eob = ' ', 94 + } 95 + vim.opt.listchars = { 96 + nbsp = "␣", 97 + extends = "»", 98 + precedes = "«", 99 + tab = " ", 100 + } 87 101 vim.o.list = true 88 102 89 103 -- splitting options 90 104 vim.go.diffopt = 'filler,vertical,foldcolumn:0,closeoff,indent-heuristic,iwhite,algorithm:patience' 91 - vim.go.fillchars = 'eob: ,vert:│,diff:╱' 92 105 vim.go.splitbelow = true 93 106 vim.go.splitright = true 94 107 vim.o.splitkeep = 'screen' 108 + vim.o.switchbuf = 'uselast' 109 + vim.o.previewheight = 5 95 110 96 111 -- undo history 97 112 local undodir = vim.fn.expand('$HOME') .. '/.cache/nvim/undo' ··· 122 137 vim.o.backspace = 'indent,eol,start' 123 138 vim.o.virtualedit = 'block' -- Allow going past the end of line in visual block mode 124 139 vim.o.formatoptions = 'qjl1' -- Don't autoformat comments 140 + vim.o.synmaxcol = 300 -- Don't highlight long lines 141 + vim.o.path = '**' -- Use a recursive path (for :find) 142 + vim.o.gdefault = true -- Use //g for replacements by default 143 + 144 + -- wildmenu 145 + vim.opt.wildignore:append( 146 + '*.png,*.jpg,*.jpeg,*.gif,*.wav,*.aiff,*.dll,*.pdb,*.mdb,*.so,*.swp,*.zip,*.gz,*.bz2,*.meta,*.svg,*.cache,*/.git/*' 147 + ) 148 + vim.o.wildmenu = true 149 + vim.o.wildmode = 'longest,list,full' 150 + 151 + -- built-in ftplugins should not change my keybindings 152 + vim.g.no_plugin_maps = true 153 + vim.cmd.filetype({ args = { 'plugin', 'on' } }) 154 + vim.cmd.filetype({ args = { 'plugin', 'indent', 'on' } }) 155 + 156 + --- ripgrep 157 + vim.o.grepprg = nix_bins.ripgrep .. ' --vimgrep --no-heading --smart-case' 158 + vim.o.grepformat = "%f:%l:%c:%m,%f:%l:%m" 125 159 126 160 -- unmap special keys 127 161 local key_opt = { noremap = true, silent = true } ··· 229 263 pattern = "markdown", 230 264 callback = function() 231 265 vim.opt_local.wrap = true 266 + vim.o.whichwrap = 'h,l' 232 267 vim.opt_local.linebreak = true 233 268 vim.opt_local.formatoptions = vim.opt_local.formatoptions + 'tcn12' 234 269 end, ··· 303 338 -- configure vim diagnostics 304 339 vim.diagnostic.config({ 305 340 underline = true, 306 - virtual_text = true, 307 341 signs = true, 308 342 update_in_insert = false, 309 343 severity_sort = true, 344 + virtual_text = { 345 + severity = { min = vim.diagnostic.severity.W }, 346 + source = 'if_many', 347 + }, 310 348 float = { 311 349 show_header = true, 312 - source = "if_many", 313 - border = "rounded", 350 + source = 'if_many', 351 + border = 'rounded', 314 352 focusable = false, 315 353 severity_sort = true, 316 354 }, ··· 327 365 extension = { 328 366 astro = 'astro', 329 367 envrc = 'bash', 368 + }, 369 + pattern = { 370 + ['.*/%.vscode/.*%.json'] = 'json5', 330 371 }, 331 372 }) 332 373