opts.lua
Branches > main > 89daf17 > files / nvim / lua / opts.lua
--- Opts, loaded before first paint!
--- UI stuff is in ui.lua
local o = vim.opt
local autocmd = vim.api.nvim_create_autocmd
o.shiftwidth = 2
o.tabstop = 2
o.softtabstop = 2
o.expandtab = true
--- 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("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")
-- Not working idk why
-- vim.cmd("rshada")
--- Flips how /g works in :s
o.gdefault = true
--- Prevents o/<CR> on comments from starting a new comment
autocmd("Filetype", {pattern = "*", callback = function()
o.formatoptions = ""
end})
o.swapfile = false
o.backup = false
o.undofile = true
--- Completion
o.completeopt = {"menu", "menuone", "fuzzy"}
end)