Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

102 Commits

Repository files navigation

Strive: Minimalist Plugin Manager for Neovim

Strive is a lightweight, feature-rich plugin manager for Neovim with support for lazy loading, dependencies, and asynchronous operations.

Features

  • ✅ Asynchronous installation and updates
  • ✅ Lazy loading based on events, filetypes, commands, and keymaps
  • ✅ Dependency management
  • ✅ Clean and intuitive API
  • ✅ Minimal overhead
  • ✅ Visual progress tracking

Installation

Manual Installation

git clone https://github.com/nvimdev/strive ~/.local/share/nvim/site/pack/strive/start/strive

Bootstrap Installation

localstrive_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

Basic Usage

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

Commands

Strive provides these commands:

  • :Strive install - Install all plugins
  • :Strive update - Update all plugins
  • :Strive clean - Remove unused plugins

Lazy Loading Methods

Events

-- Load on specific eventsuse'lewis6991/gitsigns.nvim'
:on('BufRead')
-- Multiple eventsuse'luukvbaal/stabilize.nvim'
:on({'BufRead', 'BufNewFile'})

Filetypes

-- Load for specific filetypesuse'fatih/vim-go'
:ft('go')
-- Multiple filetypesuse'plasticboy/vim-markdown'
:ft({'markdown', 'md'})

Commands

-- Load when command is useduse'github/copilot.vim'
:cmd('Copilot')
-- Multiple commandsuse'nvim-telescope/telescope.nvim'
:cmd({'Telescope', 'Telescope find_files'})

Keymaps

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

Conditional Loading

-- 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")')

Plugin Configuration

Setup Method

-- Call the setup function of a pluginuse'nvim-treesitter/nvim-treesitter'
:setup({
ensure_installed= {'lua', 'vim', 'vimdoc'},
highlight= {enable=true},
indent= {enable=true}
})

Init vs Config

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

Build Commands

-- Run a command after installing a pluginuse'nvim-treesitter/nvim-treesitter'
:run(':TSUpdate')

Local Plugin Development

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

Advanced Configuration

Custom Settings

-- 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 installations

Example Configuration

see glepnir/nvim

Best Practices

  1. Group related plugins: Use dependencies to manage related plugins
  2. Lazy-load where possible: This improves startup time
  3. Use appropriate events: Choose the right events, filetypes, or commands
  4. Keep configuration organized: Group plugins by functionality
  5. Regular updates: Run :Strive update periodically
  6. Clean unused plugins: Run :Strive clean to remove unused plugins

Troubleshooting

If you encounter issues:

  1. Check the plugin is available on GitHub
  2. Verify your internet connection
  3. Increase the timeout for Git operations:
    vim.g.strive_git_timeout=300000-- 5 minutes
  4. Enable debug logging:
    vim.g.strive_log_level='debug'
  5. Try reinstalling:
    :Strive clean
    :Strive install
    

About

minimal neovim plugin management

Resources

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages