Switch between plugins depending on your needs
-
This plugin will let you group your plugins into different profiles and load them according to your needs.
-
Previous session is remembered and your plugins are loaded automatically the next time you open nvim.
Lazy.nvim as plugin manager.
Note: All plugins are loaded using Lazy load. Plugins you wish to manage should be set to lazy = true
in your plugins.lua (or similar) when you declare them.
Only recommended with lazy.nvim:
{ 'nihancj/plugin-switcher.nvim' }
Here is an example config:
require('plugin-switcher').setup({
-- Group different plugins together with a name
plugins = {
minimal = {
'which-key.nvim',
'lualine.nvim',
},
crazycoder = {
'telescope.nvim',
'nvim-lspconfig',
'nvim-dap',
},
},
-- Set plugins to load on specified filetypes
filetype_plugins = {
lua = {
"one-small-step-for-vimkind"
},
},
-- Set a function to execute after a profile group is loaded
-- Works with groups specified in plugins and filetype_plugins
-- is_startup: true if the profile is being loaded when nvim starts.
hooks = {
crazycoder = function(is_startup)
vim.cmd "LspStart"
end
})
:Pload <profile_name>