Skip to content

nihancj/plugin-switcher.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PluginSwitcher

Switch between plugins depending on your needs

⚙️ Functionality

  • 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.

⚡ Requirements

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.

📦 Installation

Only recommended with lazy.nvim:

{ 'nihancj/plugin-switcher.nvim' }

🛠️ Setup

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
})

Commands

:Pload <profile_name>

About

A useful neovim plugin to use with lazy.nvim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages