opts.lua
Branches > main > e956ca8 > files / nvim / lua / opts.lua
local o = vim.opt
local g = vim.g
local ac = vim.api.nvim_create_autocmd
local ag = vim.api.nvim_create_augroup
o.shiftwidth = 2
o.tabstop = 2
o.softtabstop = 2
o.expandtab = true
o.swapfile = false
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 = ""
end})
--- Completion
o.completeopt = {"menu", "menuone", "fuzzy"}
--- 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")
vim.cmd("rshada")
end)