Skip to content

Commit

Permalink
fix(core): disable rtp plugins via lazy.nvim, #1339 (#1340)
Browse files Browse the repository at this point in the history
* fix(core): disable rtp plugins via `lazy.nvim`

* chore(core): add notes for disabled rtp plugins
  • Loading branch information
CharlesChiuGit authored Aug 12, 2024
1 parent c9becdf commit c9dea9d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 53 deletions.
53 changes: 0 additions & 53 deletions lua/core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,58 +22,6 @@ local createdir = function()
end
end

local disable_distribution_plugins = function()
-- Disable menu loading
vim.g.did_install_default_menus = 1
vim.g.did_install_syntax_menu = 1

-- Comment this if you define your own filetypes in `after/ftplugin`
-- vim.g.did_load_filetypes = 1

-- Do not load native syntax completion
vim.g.loaded_syntax_completion = 1

-- Do not load spell files
vim.g.loaded_spellfile_plugin = 1

-- Whether to load netrw by default
-- vim.g.loaded_netrw = 1
-- vim.g.loaded_netrwFileHandlers = 1
-- vim.g.loaded_netrwPlugin = 1
-- vim.g.loaded_netrwSettings = 1
-- newtrw liststyle: https://medium.com/usevim/the-netrw-style-options-3ebe91d42456
vim.g.netrw_liststyle = 3

-- Do not load tohtml.vim
vim.g.loaded_2html_plugin = 1

-- Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all of these plugins are
-- related to reading files inside compressed containers)
vim.g.loaded_gzip = 1
vim.g.loaded_tar = 1
vim.g.loaded_tarPlugin = 1
vim.g.loaded_vimball = 1
vim.g.loaded_vimballPlugin = 1
vim.g.loaded_zip = 1
vim.g.loaded_zipPlugin = 1

-- Do not use builtin matchit.vim and matchparen.vim because we're using vim-matchup
vim.g.loaded_matchit = 1
vim.g.loaded_matchparen = 1

-- Disable sql omni completion
vim.g.loaded_sql_completion = 1

-- Set this to 0 in order to disable native EditorConfig support
vim.g.editorconfig = 1

-- Disable remote plugins
-- NOTE:
-- > Disabling rplugin.vim will make `wilder.nvim` complain about missing rplugins during :checkhealth,
-- > but since it's config doesn't require python rtp (strictly), it's fine to ignore that for now.
-- vim.g.loaded_remote_plugins = 1
end

local leader_map = function()
vim.g.mapleader = " "
-- NOTE:
Expand Down Expand Up @@ -148,7 +96,6 @@ end

local load_core = function()
createdir()
disable_distribution_plugins()
leader_map()

gui_config()
Expand Down
22 changes: 22 additions & 0 deletions lua/core/pack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,28 @@ function Lazy:load_lazy()
reset = true, -- reset the runtime path to $VIMRUNTIME and the config directory
---@type string[]
paths = {}, -- add any custom paths here that you want to include in the rtp
disabled_plugins = {
-- Do not use builtin matchit.vim and matchparen.vim because we're using vim-matchup
"matchit",
"matchparen",
-- Do not load builtin netrw
"netrwPlugin",
-- Do not load tohtml.vim
"tohtml",
-- Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all of these plugins are
-- related to reading files inside compressed containers)
"gzip",
"tarPlugin",
"tutor",
"zipPlugin",
-- Disable remote plugins
-- NOTE:
-- > Disabling rplugin.vim will make `wilder.nvim` complain about missing rplugins during :checkhealth,
-- > but since it's config doesn't require python rtp (strictly), it's fine to ignore that for now.
"rplugin",
-- Do not load spell files
"spellfile",
},
},
},
}
Expand Down

0 comments on commit c9dea9d

Please sign in to comment.