Strive is a lightweight, feature-rich plugin manager for Neovim with support for lazy loading, dependencies, and asynchronous operations.
- ✅ Asynchronous installation and updates
- ✅ Lazy loading based on events, filetypes, commands, and keymaps
- ✅ Dependency management
- ✅ Clean and intuitive API
- ✅ Minimal overhead
- ✅ Visual progress tracking
git clone https://github.com/nvimdev/strive ~/.local/share/nvim/site/pack/strive/start/strivelocalstrive_path=vim.fn.stdpath('data') ..'/site/pack/strive/start/strive'ifnotvim.uv.fs_stat(strive_path) thenvim.fn.system({
'git',
'clone',
'--depth=1',
'https://github.com/nvimdev/strive',
strive_path
})
vim.o.rtp=strive_path..',' ..vim.o.rtpend-- Initializelocaluse=require('strive').use-- Add pluginsuse'neovim/nvim-lspconfig':ft({'c', 'lua'})
-- Lazy-load plugins based on eventsuse'lewis6991/gitsigns.nvim'
:on('BufRead')
-- Lazy-load by commandsuse'nvim-telescope/telescope.nvim'
:cmd('Telescope')
-- Colorschemeuse'folke/tokyonight.nvim'
:theme()Strive provides these commands:
:Strive install- Install all plugins:Strive update- Update all plugins:Strive clean- Remove unused plugins
-- Load on specific eventsuse'lewis6991/gitsigns.nvim'
:on('BufRead')
-- Multiple eventsuse'luukvbaal/stabilize.nvim'
:on({'BufRead', 'BufNewFile'})-- Load for specific filetypesuse'fatih/vim-go'
:ft('go')
-- Multiple filetypesuse'plasticboy/vim-markdown'
:ft({'markdown', 'md'})-- Load when command is useduse'github/copilot.vim'
:cmd('Copilot')
-- Multiple commandsuse'nvim-telescope/telescope.nvim'
:cmd({'Telescope', 'Telescope find_files'})-- Basic keymap in normal modeuse'folke/trouble.nvim'
:keys('<leader>t')
-- Specific mode, key, action and optsuse'numToStr/Comment.nvim'
:keys({
{'n', '<leader>c', '<cmd>CommentToggle<CR>', {silent=true}},
{'v', '<leader>c', '<cmd>CommentToggle<CR>', {silent=true}}
})-- Load based on a conditionuse'gpanders/editorconfig.nvim'
:cond(function()
returnvim.fn.executable('editorconfig') ==1end)
-- Using a Vim expressionuse'junegunn/fzf.vim'
:cond('executable("fzf")')-- Call the setup function of a pluginuse'nvim-treesitter/nvim-treesitter'
:setup({
ensure_installed= {'lua', 'vim', 'vimdoc'},
highlight= {enable=true},
indent= {enable=true}
})-- Init runs BEFORE the plugin loadsuse'mbbill/undotree'
:init(function()
vim.g.undotree_SetFocusWhenToggle=1end)
-- Config runs AFTER the plugin loadsuse'folke/which-key.nvim'
:config(function()
require('which-key').setup({
plugins= {
spelling= {enabled=true}
}
})
end)-- Run a command after installing a pluginuse'nvim-treesitter/nvim-treesitter'
:run(':TSUpdate')-- Load a local pluginuse'username/my-plugin'
:load_path('~/projects/neovim-plugins')
-- Or set a global development pathvim.g.strive_dev_path='~/projects/neovim-plugins'use'my-plugin'
:load_path()-- Set custom configuration before loadingvim.g.strive_auto_install=true-- Auto-install plugins on startupvim.g.strive_max_concurrent_tasks=8-- Limit concurrent operationsvim.g.strive_log_level='info' -- Set logging level (debug, info, warn, error)vim.g.strive_git_timeout=60000-- Git operation timeout in msvim.g.strive_git_depth=1-- Git clone depthvim.g.strive_install_with_retry=false-- Retry failed installationssee glepnir/nvim
- Group related plugins: Use dependencies to manage related plugins
- Lazy-load where possible: This improves startup time
- Use appropriate events: Choose the right events, filetypes, or commands
- Keep configuration organized: Group plugins by functionality
- Regular updates: Run
:Strive updateperiodically - Clean unused plugins: Run
:Strive cleanto remove unused plugins
If you encounter issues:
- Check the plugin is available on GitHub
- Verify your internet connection
- Increase the timeout for Git operations:
vim.g.strive_git_timeout=300000-- 5 minutes
- Enable debug logging:
vim.g.strive_log_level='debug'
- Try reinstalling:
:Strive clean :Strive install