Skip to content

Commit

Permalink
Fix default_plugins function in lua/core/options.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
brainfucksec committed Jul 13, 2022
1 parent 0324fa9 commit 6311a58
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions nvim/lua/core/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,35 @@ opt.updatetime = 700 -- ms to wait for trigger an event
-- Disable nvim intro
opt.shortmess:append "sI"

-- Disable builtins plugins
local disabled_built_ins = {
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin",
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
"matchit"
-- disable some builtin vim plugins
local default_plugins = {
"2html_plugin",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"synmenu",
"optwin",
"compiler",
"bugreport",
"ftplugin",
}

for _, plugin in pairs(disabled_built_ins) do
g["loaded_" .. plugin] = 0
for _, plugin in pairs(default_plugins) do
g["loaded_" .. plugin] = 1
end

0 comments on commit 6311a58

Please sign in to comment.