2bb8fe1

Branches > main > 2bb8fe1 > files / nixos / machines / pc

Lazily load vim builtin plugins

Grahp, 2026-02-02

Commit: 2bb8fe178e5170e6c96b488d99cf2cde0baa7fdd
Parent: be0925d

1 changed file:

nvim/lua/opts.lua modified (view file)

@@ -3,9 +3,6 @@ local ac = vim.api.nvim_create_autocmd local ag = vim.api.nvim_create_augroup -g.loaded_netrw = 1-g.loaded_netrwPlugin = 1- o.shiftwidth = 2 o.tabstop = 2 o.softtabstop = 2@@ -15,6 +12,9 @@ o.backup = false o.undofile = true +--- Flips how /s works in :s :D+o.gdefault = true+ --- Prevents o/<CR> on comments from starting a new comment ac("Filetype", {pattern = "*", callback = function()   o.formatoptions = ""@@ -23,6 +23,20 @@ --- Completion o.completeopt = {"menu", "menuone", "fuzzy"} ---- Loads shada after initialization :p+--- Loads vim builtin plugins after first paint+--- Might not work if you try to `nvim foo.zip` or whatever+o.loadplugins = false o.shada = ""-vim.schedule(function() vim.cmd("rshada") end)++vim.schedule(function()+  vim.cmd("runtime plugin/matchparen.vim")+  vim.cmd("runtime plugin/matchit.vim")+  vim.cmd("runtime plugin/editorconfig.vim")+  vim.cmd("runtime plugin/gzip.vim")+  vim.cmd("runtime plugin/zipPlugin.vim")+  vim.cmd("runtime plugin/tarPlugin.vim")+  vim.cmd("runtime plugin/rplugin.vim")+  vim.cmd("runtime plugin/shada.vim")++  vim.cmd("rshada")+end)