Code Monkey home page Code Monkey logo

lazy.nvim's Introduction

lazy.nvim is a modern plugin manager for Neovim.

image

✨ Features

  • 📦 Manage all your Neovim plugins with a powerful UI
  • 🚀 Fast startup times thanks to automatic caching and bytecode compilation of Lua modules
  • 💾 Partial clones instead of shallow clones
  • 🔌 Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings
  • ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away
  • 💪 Async execution for improved performance
  • 🛠️ No need to manually compile plugins
  • 🧪 Correct sequencing of dependencies
  • 📁 Configurable in multiple files
  • 📚 Generates helptags of the headings in README.md files for plugins that don't have vimdocs
  • 💻 Dev options and patterns for using local plugins
  • 📊 Profiling tools to optimize performance
  • 🔒 Lockfile lazy-lock.json to keep track of installed plugins
  • 🔎 Automatically check for updates
  • 📋 Commit, branch, tag, version, and full Semver support
  • 📈 Statusline component to see the number of pending updates
  • 🎨 Automatically lazy-loads colorschemes

⚡️ Requirements

  • Neovim >= 0.8.0 (needs to be built with LuaJIT)
  • Git >= 2.19.0 (for partial clones support)
  • a Nerd Font (optional)
  • luarocks to install rockspecs. You can remove rockspec from opts.pkg.sources to disable this feature.

🚀 Getting Started

Check the documentation website for more information.

lazy.nvim's People

Contributors

0xadk avatar 3719e04 avatar abeldekat avatar acksld avatar artandreev avatar athepeanut4 avatar benelan avatar bkoropoff avatar bojanstipic avatar clason avatar craigmac avatar dependabot[bot] avatar dirn avatar dsully avatar dundargoc avatar folke avatar github-actions[bot] avatar indianboy42 avatar jemag avatar kdarkhan avatar kyoh86 avatar mariasolos avatar max397574 avatar muniftanjim avatar polyzen avatar ribru17 avatar slbug avatar tsakirist avatar tzachar avatar unrealapex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lazy.nvim's Issues

Allow setting a mode for a keymap

Is your feature request related to a problem? Please describe.

Since keys only works with normal mode, if you are in another mode it will not load the plugin when using the keymap.

Describe the solution you'd like

Allow mapping keys to a mode. Something like:

keys = {
  n = "<leader>fd"
}

or

keys = {
  { "n", "<leader>fd" },
}

Unable to update or sync

image

I am getting the above error everytime I open neovim, I've tried reinstalling everything, update, and sync.

Neovim Version

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.1/share/nvim"

Run :checkhealth for more info

To Reproduce
Steps to reproduce the behavior:

I haven't put much time in making a minimal reproducible config, but I believe it is because I have added plenary.nvim as a dependency for multiple plugins.

A command to remove cache

Is your feature request related to a problem? Please describe.

Maybe because I do not delete packages packer downloaded,
lazy always loads plugins from the wrong path.

Describe the solution you'd like

If the cache was wrongly generated, It's hard to debug and find out what's wrong.
Maybe a command with the cache cleaning functionality is necessary.

add some patterns for lazy loading

just some things (I just write those here because I think they don't exist yet and are quite nice)
you can consider which (if any) are worth implementing

groups for keys wbthomason/packer.nvim#1063

patterns for commands like NvimTree* or NvimTree{Toggle,Open,Close}

ig for autocommands this should work anyway (haven't looked at the code yet though)

Way to check the introduced changes of a commit (after plugin update)?

Is there any way to check the code that was introduced by a plugin's update?
Something equivalent to packer's d ?

For instance, I tried now to check what code was introduced after the latest commit that fixed the other issue, but the only thing I could find in the docs was the gl command which only shows the commit details but not the code (i.e. git diff).

Would be really nice to have some kind of a floating window to show the git diff command.

colorscheme failing to load if set via vimscript

First of all thank you again for yet another great and solid work!

I am getting an exception while loading colorschemes if the instructions for it come from vimscript runtime paths (allegedly not if setting the option in init.lua). I have created a minimally reproducible neovim configuration as follows:

├── lua
│  └── plugins.lua
├── plugin <-- this is standard vim runtime path
│  └── settings.vim
└── init.lua

where init.lua contains, as per README

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
 if not vim.loop.fs_stat(lazypath) then
   vim.fn.system({
     "git",
     "clone",
     "--filter=blob:none",
     "--single-branch",
     "https://github.com/folke/lazy.nvim.git",
     lazypath,
   })
 end
 vim.opt.runtimepath:prepend(lazypath)

require("lazy").setup("plugins")

with the corresponding lua/plugins.lua file containing the list of plugins to load, as per your example

return {
    'folke/tokyonight.nvim'
 }

Now if I activate the colorscheme adding, in plugin/settings.vim

colorscheme tokyonight

I get an exception from this line and the colorscheme does not load (even if I manually set it within neovim with :colorscheme tokyonight). Viceversa, if I instead append vim.cmd[[colorscheme tokyonight]] to init.lua (after loading lazy.nvim) then all is good.

TL;DR colorschemes are only applied if instructed so in init.lua, not so if the instruction is given through standard vim runtime path plugin/<something>.vim

P. S. You may be asking why I still give the instruction via vimscript files: it is because I am currently using VimPlug and with it most settings are more easily set still via vimscript.

Which version of Neovim are you using?

nvim --version
NVIM v0.9.0-dev-531+gf04087d8b-dirty
Build type: Release
LuaJIT 2.1.0-beta3

Error detected while processing VimEnter Autocommands for "*" Invalid window id: 1001

Describe the bug
Even with minimal setup and basically empty nvim folder (minus init.lua), I get an error thrown on fresh start after the lazy window open for a second or so.

Which version of Neovim are you using?
NVIM v0.9.0-dev-528+g3283f4ebd
Build type: Release
LuaJIT 2.1.0-beta3

To Reproduce
Steps to reproduce the behavior:

  1. cd ~/.config/ && mv nvim nvim.bak to remove any rtp stuff and have clean nvim folder
  2. rm -rf ~/.config/local/share/nvim/lazy to remove any previous lazy stuff
  3. rm -rf ~/.config/local/state/nvim/lazy to remove any previous lazy stuff
  4. mkdir ~/.config/nvim && cd ~/.config/nvim to create fresh nvim folder
  5. nvim init.lua to create brand new init.lua

Add:

vim.g.mapleader = " "

local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    '--single-branch',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

require("lazy").setup({
  "nvim-lua/plenary.nvim",
  'tpope/vim-commentary',
  'tpope/vim-repeat',
  'tpope/vim-unimpaired',
  'tpope/vim-surround',
  'tpope/vim-markdown',
  'gpanders/editorconfig.nvim',
})

vim.keymap.set('n', '<Leader>l', '<cmd>Lazy<CR>')
  1. :wq
  2. nvim
  3. lazy.nvim window opens on restart, and then this error occurs:
Error detected while processing VimEnter Autocommands for "*":
Error executing lua callback: ...g/local/share/nvim/lazy/lazy.nvim/lua/lazy/view/init.lua:84: Invalid window id: 1001
stack traceback:
        [C]: in function 'nvim_set_current_win'
        ...g/local/share/nvim/lazy/lazy.nvim/lua/lazy/view/init.lua:84: in function <...g/local/share/nvim/lazy/lazy.nvim/lua/lazy/view/init.lua:83>

Expected Behavior
On startup lazy.nvim is installed and plugins are installed.

Screenshots
Nothing really to see, just an empty buffer with that error in the messages area.

:checkhealth lazy output:

lazy: require("lazy.health").check()

lazy.nvim ~
- OK no existing packages found by other package managers
- OK packer_compiled.lua not found

"Cannot make changes" when auto installing plugins on startup

Describe the bug
Whenever I add a new plugin, save and open to auto install I will get this weird error:

my settings file: https://github.com/MordechaiHadad/nvim/blob/master/lua/core/settings.lua

Which version of Neovim are you using?
Nightly: v0.9.0-dev-530+gde90a8bfe

To Reproduce
Steps to reproduce the behavior:

  1. Add new plugin
  2. Save plugins file
  3. Open neovim and after it auto installs I will get this error

Expected Behavior
not to error?

Log
Not seeing any errors

Color Scheme needs to be loaded *twice* to fully take effect.

Describe the bug
The Color Scheme needs to be loaded twice to fully take effect. This issue only occurred after switching to lazy, it did not occur with packer. It occurs with all color schemes I have tested.

Which version of Neovim are you using?

macOS 13.0.1 (M1)
neovim 0.8.1 (homebrew)
Neovide 0.10.3 (homebrew)

To Reproduce
see the video below.

  • starting state: no color scheme set.
  • first restart: start without color scheme set.
  • second restart: color scheme is set once.
  • third restart: color scheme is set two times.

When the color scheme is set once, the blue dots (listchars) and the color column to the right are off. Setting the color scheme two times fixes this. (sorry for the sound, forgot to turn off audio during recording)

Screen.Recording.2022-12-20.at.21.06.12.mov

Log
No errors

Sub modules not loading

Hey, I tried migrating from packer to lazy. My current plugin structure is this.

In my init.lua i specify:

require("lazy").setup("plugins", { defaults = { version = "*" } })

The readme tells me:

any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

But currently only the ~/.config/nvim/lua/plugins/init.lua file gets sourced and plugins installed from it. For example my fuzzy finder is neither loaded nor installed:
:lua require('fzf-lua').files():

E5108: Error executing lua [string ":lua"]:1: module 'fzf-lua' not found:
        no field package.preload['fzf-lua']
        no file '/nix/store/w08dyn0iamcixgc6cgv9ma8sq165vlvq-luajit-2.1.0-2022-10-04-env/share/lua/5.1/fzf-lua.lua'
        no file '/nix/store/w08dyn0iamcixgc6cgv9ma8sq165vlvq-luajit-2.1.0-2022-10-04-env/share/lua/5.1/fzf-lua/init.lua'
        no file '/nix/store/w08dyn0iamcixgc6cgv9ma8sq165vlvq-luajit-2.1.0-2022-10-04-env/lib/lua/5.1/fzf-lua.so'fzf-lua not found in lazy plugin
s
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

What am I missing?

plugin configs (/after/plugin) not loaded

Describe the bug
I have an issue that my configs in /after/plugin/* are not loaded.

Which version of Neovim are you using?

VIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Ventura

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.8.1/share/nvim"

Run :checkhealth for more info

To Reproduce
Steps to reproduce the behavior:

  1. Clone github.com/rgruyters/nvim.git
  2. checkout branch feature/lazy
  3. start Neovim (nvim)

Expected Behavior
For example, bufferline should be working, Telescope keymaps (ff) should be working, etc.

Screenshots
If applicable, add screenshots to help explain your problem.

Log
No errors found

local plugins have "log failed" error msg

Describe the bug
The four plugins load and work as expected, but in the Lazy window, they get some error message where I cannot figure out what the issue is

Pasted image 2022-12-20 19 05 49

Which version of Neovim are you using?

macOS 13.0.1 (M1)
neovim 0.8.1 (homebrew)
Neovide 0.10.3 (homebrew)

To Reproduce

require("lazy").setup("config/plugin-list", {
       ...
	dev = {
		path = vim.fn.stdpath("config") .. "/my-plugins/",
	},
})
--  config/plugin-list.lua
return {
      {"chrisgrieser/nvim-recorder", dev = true},
     -- the same for the other plugins
}

Log
The log only lists lazy.nvim breaking changes, nothing related to the problem above.

question: performance of plugin structure

https://github.com/folke/lazy.nvim#-structuring-your-plugins

there is this part of the readme which say that you can basically have all your plugins in some files in the same folder.
I wonder how the performance of this is in comparison to just pass all the plugin specs directly to the function
since when you do the first one there are (depending on how many plugins you have) quite a few require calls to be made. Also all the stuff inside the files is loaded then.

`Merging plugins is not supported for key `dir``

Describe the bug
I get this error on startup for all the local plugins (as new) in combination with always the same plugin as old.
If I remove the plugin then just another one is the old one.

Which version of Neovim are you using?
NVIM v0.9.0-dev-525+ga7332ba9b

Expected Behavior
No errors

Screenshots
image
image

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Lazy log

lazy.nvim (H) Install (I) Update (U) Sync (S) Clean (X) Check (C) Log (L) Restore (R) Profile (P) Debug (D) Help (?)

Total: 55 plugins

Breaking Changes (1)
● lazy.nvim 56170.32ms  init.lua
3c3a711 chore(build): auto-generate vimdoc (67 minutes ago)
44f80a7 feat(plugin): allow plugin files only without a main plugin module. Fixes #53 (68 minutes ago)
f5734f5 chore(build): auto-generate vimdoc (2 hours ago)
3814883 fix(ui): set current win only when its valid (2 hours ago)
3a7b8c8 chore(main): release 5.1.0 (#30) (11 hours ago)
3606d62 fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 (11 hours ago)
b193f96 fix(spec): only process a spec once (11 hours ago)
7be46bc style: removed unused requires (12 hours ago)
897d6df fix: add filetype to window buffer. (#41) (13 hours ago)
14300b3 chore(build): auto-generate vimdoc (13 hours ago)
78e9d6c docs: add a note about mapleader (13 hours ago)
06ac8bd perf(ui): clear existing extmarks before rendering (13 hours ago)
ffcd0ab fix(loader): source filetype.lua before plugins. Fixes #35 (14 hours ago)
9d12cdc fix(git): don't run git log for submodules. Fixes #33 (14 hours ago)
06ffcf5 chore(build): auto-generate vimdoc (14 hours ago)
7fb0652 docs: added docs on update checker (14 hours ago)
1f86cb3 chore(build): auto-generate vimdoc (15 hours ago)
3cffb2a docs: added change detection to the readme (15 hours ago)
6c767a6 feat: added options to configure change detection. Fixes #32 (15 hours ago)
cd162f3 chore(build): auto-generate vimdoc (15 hours ago)
941df31 feat(ui): make the windoww size configurable. Fixes #34 (15 hours ago)
5298441 fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 (16 hours ago)
2927b05 docs: added lincense (16 hours ago)
4d78203 chore(main): release 5.0.1 (#17) (17 hours ago)
1371a14 fix(build): use the shell to execute build commands (17 hours ago)
ffabe91 fix(cache): if mod is loaded already in the loader, then return that (18 hours ago)
316503f fix: dont autoload cached modules when module=false (18 hours ago)
992c679 fix: always set Config.me regardless of reset rtp (18 hours ago)
df6c986 fix: add neovim libs to rtp for treesitter parsers etc (19 hours ago)
49b69b7 chore(build): auto-generate vimdoc (20 hours ago)
e9d3a73 fix: default logs are now since 3 days ago to be in line with the docs (20 hours ago)
4234322 chore(build): auto-generate vimdoc (20 hours ago)
6e32759 fix: deepcopy lazyspec before processing (20 hours ago)
ec0f8d0 docs: added config.dev.path to the example (20 hours ago)
6404d42 fix: move re-sourcing check to the top (20 hours ago)
ddf36d7 fix: checker should not error on non-existing dirs (20 hours ago)
50ba619 test: fix tests (21 hours ago)
f78d8bf fix: show error when merging, but continue (21 hours ago)
b8a0055 chore(build): auto-generate vimdoc (22 hours ago)
1754056 fix: use jobstart instead of system to open urls (22 hours ago)
5ecc988 docs: use https to bootstrap lazy (22 hours ago)
ae644a6 fix: only run updated checker for installed plugins. Fixes #16 (22 hours ago)
7225b05 chore(build): auto-generate vimdoc (23 hours ago)
17fd57a docs: added docs for statusline and count (23 hours ago)
48a596e chore(build): auto-generate vimdoc (23 hours ago)
dfe8a65 docs: removed extra performance section (23 hours ago)
1fa2d87 docs: moved my dots to structuring plugins (23 hours ago)
9916318 chore(build): auto-generate vimdoc (23 hours ago)
abe026a docs: added section on performance (23 hours ago)
82aea47 chore(build): auto-generate vimdoc (24 hours ago)
72d66cd docs: updated lua stuff (24 hours ago)
ca43018 chore(build): auto-generate vimdoc (24 hours ago)
36cb7ea docs: migration guide (24 hours ago)
2f59ead chore(main): release 5.0.0 (#12) (24 hours ago)
dbcf675 chore(build): auto-generate vimdoc (24 hours ago)
b906ad9 docs: added windows to supported platforms (24 hours ago)
cb87aa3 ci: run tests on linux only for nw (25 hours ago)
75a36f3 chore(build): auto-generate vimdoc (25 hours ago)
af87108 fix(util): fixed double slashes (25 hours ago)
62c1542 fix(cache): normalize paths (26 hours ago)
bb1c2f4 feat: added support for Windows (27 hours ago)
198963f feat: utility method to normalize a path (27 hours ago)
a189883 fix: check for installed plugins with plain find (27 hours ago)
833b387 chore(build): auto-generate vimdoc (2 days ago)
ff89319 docs: removed dots from features (2 days ago)
b7bf18a style: spelling (2 days ago)
66dad89 chore(build): auto-generate vimdoc (2 days ago)
0c0b8b7 docs: todo (2 days ago)
92fd0d4 docs: updated installation and structuring plugins (2 days ago)
1baa92f docs: added docs on <cr> and <K> (2 days ago)
d827d8a docs: collapse semver examples (2 days ago)
1e16363 chore(build): auto-generate vimdoc (2 days ago)
980cfa9 docs: added config example when not using a Nerd Font (2 days ago)
713dcb6 build: added markdownlint config (2 days ago)
706fe6f chore(build): auto-generate vimdoc (2 days ago)
5ed9855 feat: added completion for all lazy commands (2 days ago)
b462787 docs: added optional plugins to docs for commands and methods (2 days ago)
f29f3d2 chore(build): auto-generate vimdoc (2 days ago)
1efa710 feat: added module=false to skip auto-loading of plugins on require (2 days ago)
55d194c chore(build): auto-generate vimdoc (2 days ago)
bac34cc docs: added section on uninstalling (2 days ago)
c065ca2 chore(build): auto-generate vimdoc (2 days ago)
2dd6230 feat: added :Lazy load foobar.nvim to load a plugin (2 days ago)
8a0da3b config: move lazy cache to state/nvim/lazy/cache (2 days ago)
7eb6034 chore(build): auto-generate vimdoc (2 days ago)
6567580 chore: todo (2 days ago)
6f00cde docs: typos (2 days ago)
faac2dd perf(cache): cache loadfile and no find modpaths without package.loaders (2 days ago)
32f2b71 fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise (2 days ago)
1fe43f3 fix(ui): focus Lazy window when auto-installing plugins in VimEnter (2 days ago)
d4aee27 feat!: removed the LazyUpdate etc commands. sub-commands only from now on (2 days ago)
b89e6bf perf: lazy-load the commands available on the lazy module (3 days ago)
48309dd chore(main): release 4.2.0 (#11) (3 days ago)
c87673c feat(ui): added help for on a plugin (3 days ago)
b88b7d7 chore(build): auto-generate vimdoc (3 days ago)
e42a180 docs: added line on :checkhealth (3 days ago)
2526a01 chore(build): auto-generate vimdoc (3 days ago)
968fa3f style: removed bold from home button (3 days ago)
5fc87f9 docs: updated screenshots (3 days ago)
cd3d87c chore(build): auto-generate vimdoc (3 days ago)
d0651e4 docs: added section about the lockfile (3 days ago)
39f629e chore(build): auto-generate vimdoc (3 days ago)
628d421 docs: added my dots to the examples (3 days ago)
c88ad91 docs: added section on versioning (3 days ago)
78b284c docs: added section on lazy loading (3 days ago)
c0d3617 feat: check if ffi is available and error if not (3 days ago)
0f62ec0 chore(build): auto-generate vimdoc (3 days ago)
b70bb19 docs: added more detailed requirements (3 days ago)
db469ed chore(build): auto-generate vimdoc (3 days ago)
671b163 docs: added more details on startup sequence (3 days ago)
1730661 docs: generate docs for commands (3 days ago)
f25f942 feat: expose all commands on main lazy module (3 days ago)

Log (11)
● LuaSnip 67.66ms  nvim-cmp
5570fd7 Auto generate docs (13 hours ago)
618b945 log: don't print a message on every start, provide log.ping() instead. (13 hours ago)

○ gitsigns.nvim
    2ab3bdf fix(blame): #697 (2 days ago)

● neodev.nvim 8.8ms   nvim-lspconfig
    c5f0a81 chore: auto-generated types for Neovim nightly (3 hours ago)
    f8b17d3 chore: auto-generated types for Neovim nightly (27 hours ago)

● noice.nvim 1.42ms   LazyLoad
    e4a4290 chore(build): auto-generate vimdoc (2 days ago)
    29a2e05 feat: added `Filter.cond` to conditionally use a route (2 days ago)
    7dac8ce chore(build): auto-generate vimdoc (3 days ago)
    c9c1fbd fix: correctly apply padding based on four numbers (3 days ago)

● nui.nvim 0.1ms   noice.nvim
    b12db53 fix(layout): process split layout box change (4 hours ago)
    51721a4 fix(layout): process float layout box change (4 hours ago)
    96ef1cb feat(split): store id internally (4 hours ago)

● nvim-dap 4.04ms   LazyLoad   rust-tools.nvim
    284c754 Stop resizing widgets if converted to non-float window (2 days ago)
    3971d9b Allow opening multiple frames or scopes widgets (2 days ago)

● nvim-lspconfig 20.69ms   LazyLoad
    5292d60 docs: update server_configurations.md skip-checks: true (7 hours ago)
    f70a094 fix: rename ruff-lsp to ruff_lsp (#2337) (7 hours ago)
    80e81b1 docs: update server_configurations.md skip-checks: true (7 hours ago)
    d8a4493 chore: remove `languageFeatures`, `documentFeatures` (#2336) (7 hours ago)
    baab771 docs: update server_configurations.md skip-checks: true (8 hours ago)
    4e13145 feat: add ruff-lsp support (#2335) (8 hours ago)
    d597b0f fix: send the lsp method request after insert workspace folders (#2330) (27 hours ago)
    1ab2720 docs: update server_configurations.md skip-checks: true (27 hours ago)
    9c70f37 feat: add jq support (#2333) (27 hours ago)
    259729c docs: update server_configurations.md skip-checks: true (29 hours ago)
    aa22008 feat: add uvl support (#2331) (29 hours ago)
    dd9e7f9 fix(gdscript): support get the port from env variable (#2313) (31 hours ago)
    22c87d6 build(rockspec): fix rockspec package name (2 days ago)

● nvim-treesitter 10.2ms   nvim-treesitter-refactor
    eedb7b9 csharp: update query to parser change (26 hours ago)
    8498ebd Update parsers: c_sharp, jsonnet, query (26 hours ago)
    6e37050 Update parsers: swift (2 days ago)
    a75aded highlights(java): fix '!',param,global group (2 days ago)

● nvim-treesitter-textobjects 1.69ms   LazyLoad
    e2ee8fd ci: bump stylua version (3 days ago)

● playground 0.98ms   LazyLoad   nvim-treesitter
    3421bbb ci: bump action versions (3 days ago)

○ telescope.nvim
    d16581e fix: misidentification invert and files_with_matches (#2240) (#2262) (78 minutes ago)
    278c797 fix(builtin.live_grep): add spacer ":" even when coordinates disabled (#2275) (79 minutes ago)

Clean (6)

○ friendly-snippets
○ lense.nvim
● nvim-cmp 85.92ms  CmdLineEnter
○ packer.nvim
● which-key.nvim 90.9ms  LazyLoad

Loaded (9)
● neogen 0.64ms  nvim-cmp
● nvim-autopairs 1.85ms  LazyLoad  nvim-cmp
● nvim-dap-ui 2.92ms  LazyLoad  nvim-dap
● nvim-dap-virtual-text 0.18ms  nvim-dap
● nvim-notify 0.14ms  noice.nvim
● nvim-treesitter-refactor 11.24ms  LazyLoad
● one-small-step-for-vimkind 0.12ms  nvim-dap
● plenary.nvim 1.21ms  nvim-cmp
● rust-tools.nvim 7.27ms  nvim-lspconfig

Installed (28)
○ Comment.nvim
○ bufferline.nvim
○ cmp-emoji
○ cmp-latex-symbols
○ cmp-nvim-lsp
○ cmp-nvim-lua
○ cmp-path
○ cmp_luasnip
○ dirbuf.nvim
○ formatter.nvim
○ gitlinker.nvim
○ heirline.nvim
○ indent-blankline.nvim
○ jeskape.nvim
○ lightspeed.nvim
○ luv-vimdocs
○ nabla.nvim
○ neorg
○ nvim-colorizer.lua
○ nvim-surround
○ nvim-treesitter-endwise
○ nvim-web-devicons
○ paperplanes.nvim
○ ssr.nvim
○ telescope-file-browser.nvim
○ telescope-fzf-native.nvim
○ toggleterm.nvim
○ trouble.nvim

[Question] What does "merge" mean?

In your README is:

any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

does that mean that everything related in ~/.config/nvim/lua/plugins/*.lua will added to rtp?

First impressions

  • I think the installation section, specifically the loading part, could use an
    extra sentence or two. I was confused on what config.plugins was initially.
    Maybe a quick, "for example, if you have a lua file
    ~/.config/nvim/lua/config/plugins.lua that returns a table" or something it'd
    remove most question marks I think.
  • When autoinstalling the plugins the cursor isn't focused on the floating
    window, but on the non-floating window in the background.
  • Doing :Lazy clean doesn't show which plugins were removed.
  • Shouldn't the "Versioning" section be in the "Lockfile" chapter?
  • Why are personal dotfiles used as examples? Dotfiles change all the time,
    there's no guarantee this will be relevant or even exist in two years.
  • What's the difference between lazy-loading and verylazy-loading?
  • Most emojis in "Configuration" aren't shown for me.
  • add section on how to uninstall
  • add :Packadd command or something similar

Typos:

  • automcatilly check for plugin updates
  • A custom name for the plugin used for the local plugin directory and as the dispay name
  • local plugins need to be explicitely configured with dir

Nitpicks:

  • Bootstrap code is unevenly indented.
  • "Works on Linux, MacOS and Windows" lol just remove this line, it's not needed anymore.

Plugins lazily loaded on keys with an identical mapping in config won't show on first request

Describe the bug

For nvim-tree to show up for example, I have to type leaderk once for it to be internally loaded by lazy.nvim it seems, only then, typing again leaderk will bring the nvim-tree window up.

I have the same behavior replicated for most other plugins I load by keys.

Which version of Neovim are you using?

NVIM v0.8.1 on ArchLinux

To Reproduce
Steps to reproduce the behavior:

  1.  {
         'kyazdani42/nvim-tree.lua', keys = '<leader>k',
         dependencies = 'kyazdani42/nvim-web-devicons',
         config = function()
             vim.cmd [[nnoremap <silent> <leader>k :NvimTreeToggle<cr>]]
         end
     }
    
  2. leaderk (won't show anything)
  3. leaderk (shows nvim-tree)

Expected Behavior

It should be displayed on first request.

Add `manual` option

The current lazy option is not exactly analogous to packer's opt, which (if not implied by other lazy-loading options like cmd or module1) does not put the plugin in runtimepath unless explicitly packadded.

This is useful for me for keeping nvim-treesitter around for testing but preventing it to be pulled in by other plugins who are eager to use it if available, which currently doesn't seem to be possible with Lazy.

So my suggestion is to add a new option manual for plugins that are not lazy-loaded and only explicitly via, e.g., :Lazy load.


1which as far as I can tell is the closer analogue to `lazy`, in fact

vim-bqf is not working?

Describe the bug
this plugin:
https://github.com/kevinhwang91/nvim-bqf
does not work when installed from lazy.
from packer it works as expected.
I would love to help debug it, I created 2 minimal configs, where with the packer one the plugin is working

Which version of Neovim are you using?
Gui(specify which GUI client you are using)? Nightly? Version?

NVIM v0.9.0-dev-530+gde90a8bfe

Packer

packer-minimal-init.lua
local on_windows = vim.loop.os_uname().version:match("Windows")

local function join_paths(...)
local path_sep = on_windows and "\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end

local temp_dir = vim.loop.os_getenv("TEMP") or "/tmp"
vim.opt.grepprg = "rg --vimgrep"

vim.cmd("set packpath=" .. join_paths(temp_dir, "nvim", "site"))

local package_root = join_paths(temp_dir, "nvim", "site", "pack")
local install_path = join_paths(package_root, "packer", "start", "packer.nvim")
local compile_path = join_paths(install_path, "plugin", "packer_compiled.lua")

local function load_plugins()
require("packer").startup({
{
"wbthomason/packer.nvim",
"kevinhwang91/nvim-bqf",
},
config = {
package_root = package_root,
compile_path = compile_path,
},
})
end

if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({ "git", "clone", "https://github.com/wbthomason/packer.nvim", install_path })
load_plugins()
require("packer").sync()
vim.cmd([[autocmd User PackerComplete ++once lua load_config()]])
else
load_plugins()
require("packer").sync()
end

Lazy

lazy-minimal-init.lua
local on_windows = vim.loop.os_uname().version:match 'Windows'

local function join_paths(...)
local path_sep = on_windows and '\' or '/'
local result = table.concat({ ... }, path_sep)
return result
end

vim.cmd [[set runtimepath=$VIMRUNTIME]]

local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp'
vim.opt.grepprg = 'rg --vimgrep'

vim.cmd('set packpath=' .. join_paths(temp_dir, 'nvim', 'site'))

local package_root = join_paths(temp_dir, 'nvim', 'site', 'pack')

local lazypath = join_paths(temp_dir, 'nvim', 'site') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)

require('lazy').setup({
'kevinhwang91/nvim-bqf',
}, {
root = package_root,
})

To reproduce

  1. Download the config, run nvim with it nvim -nu /path/to/config
  2. search for something in the CWD using vimgrep: vimgrep something *
  3. open quickfix window copen

Expected Behavior
When opening a quickfix window, it should show a preview of the buffer of the quickfix item, like this:

Screenshots
image

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Lazy log
paste log here

unclear description of `Lazy load`

for me it isn't clear whether the function can load multiple plugins at once (with a table or multiple arguments) or not
especially because it's written in plural and in singular form

image

(forgive me for opening this issue, I don't had yet the time to migrate so I couldn't test)

Customizable keymaps for `Lazy` floating window

Is your feature request related to a problem? Please describe.
I have a bad habit of mapping K to 10gk, but I am too deep down the rabbit hole to go back. It is a bit painful that K is mapped by default in the lazy popup window overwriting my mapping of K.

Describe the solution you'd like
Customisable keymaps in the lazy popup window. For me, only being able to map K to something else would be great, but I think it would be awesome to customise all keymaps in the popup window.

Describe alternatives you've considered
I don't really know of another way to map the behaviour of K to another key while still having my original mapping of K. I want to maybe map it to gd for example instead of K.

Wildcards in tag seems broken.

Describe the bug
When I try to use bufferline.nvim with tag = "v3.*" or tag = "v3.*.*" it can't find the tag. If I use tag = "v3.1.0" it works.

Which version of Neovim are you using?

:version
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

image

[Question] Trying to migrate from `packer.nvim`

I'm trying to migrate from packer.nvim. I split all my plugins configuration into separate files and load them with:

vim.api.nvim_command("packadd packer.nvim")
function plugin_config(name)
    return string.format('require("plugins/%s")', name)
end

Let's say I want to load navarasu/onedark.nvim with the config file at ~/.config/nvim/lua/plugins/onedark.lua. I use:

return require("packer").startup({
    function(use)
        use({ "navarasu/onedark.nvim", config = plugin_config("onedark") })
})

I'm trying to achieve the same thing with lazy.nvim but I can't figure how to. Without:

vim.api.nvim_command("packadd packer.nvim")

I'm getting the following error:

    Failed to run `config` for onedark.nvim
    attempt to call a string value
    # stacktrace:
    - .config/nvim/lua/plugins.lua:23
    - .config/nvim/init.lua:1

Thanks in advance!

key lazyloading with which-key.nvim needs to be used twice

Describe the bug
I need to press <space>cc twice to actually make it work
the first time it isn't mapped

Which version of Neovim are you using?
NVIM v0.9.0-dev-525+ga7332ba9b

To Reproduce

Steps to reproduce the behavior:

  1. `nvim -u repro.lua repro.lua
  2. <space>cc
  3. <space>cc

Expected Behavior
line gets commented out on 2.

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Lazy log

lazy.nvim (H) Install (I) Update (U) Sync (S) Clean (X) Check (C) Log (L) Restore (R) Profile (P) Debug (D) Help (?)

Total: 60 plugins

Breaking Changes (1)
● lazy.nvim 18.74ms  init.lua
b7c489b fix(loader): lua modules can be links instead of files. Fixes #66 (55 minutes ago)
7a57ea2 chore(build): auto-generate vimdoc (74 minutes ago)
c228908 fix(health): don't show warning on module=false (75 minutes ago)
b68f94b ci: Update issue templates (2 hours ago)
bbebb67 ci: Update issue templates (2 hours ago)
95fc814 chore(build): auto-generate vimdoc (2 hours ago)
876f7bd feat(loader): allow to add extra paths to rtp reset. Fixes #64 (2 hours ago)
a345649 fix(cache): if we can't load from the cache modpath, find path again instead of erroring right away (2 hours ago)
bbace14 fix(git): only mark a plugin as dirty if an update changed the commit HEAD. Fixes #62 (3 hours ago)
a939243 fix(checker): allow git checks only for non-pinned plugins (#61) (3 hours ago)
57bea32 chore(build): auto-generate vimdoc (3 hours ago)
ff24f49 fix(loader): source rtp /plugin files after loading start plugins. Fixes (3 hours ago)
b802729 chore(build): auto-generate vimdoc (6 hours ago)
9dfefac docs: fixed indentation of auto-generated code blocks (6 hours ago)
71b2e2f docs: lazy works on all OSs now (6 hours ago)
232232d fix(ui): install command can have plugins as a parameter (6 hours ago)
4ca3039 feat(loader): warn when mapleader is changed after init (7 hours ago)
540847b fix: strip / from dirs. Fixes #60 (7 hours ago)
86eaa11 fix(git): dereference tag refs. Fixes #54 (7 hours ago)
e95da35 feat(util): utility method to get sync process output (7 hours ago)
3c3a711 chore(build): auto-generate vimdoc (8 hours ago)
44f80a7 feat(plugin): allow plugin files only without a main plugin module. Fixes #53 (8 hours ago)
f5734f5 chore(build): auto-generate vimdoc (9 hours ago)
3814883 fix(ui): set current win only when its valid (9 hours ago)
3a7b8c8 chore(main): release 5.1.0 (#30) (18 hours ago)
3606d62 fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 (18 hours ago)
b193f96 fix(spec): only process a spec once (18 hours ago)
7be46bc style: removed unused requires (19 hours ago)
897d6df fix: add filetype to window buffer. (#41) (20 hours ago)
14300b3 chore(build): auto-generate vimdoc (20 hours ago)
78e9d6c docs: add a note about mapleader (20 hours ago)
06ac8bd perf(ui): clear existing extmarks before rendering (21 hours ago)
ffcd0ab fix(loader): source filetype.lua before plugins. Fixes #35 (21 hours ago)
9d12cdc fix(git): don't run git log for submodules. Fixes #33 (21 hours ago)
06ffcf5 chore(build): auto-generate vimdoc (22 hours ago)
7fb0652 docs: added docs on update checker (22 hours ago)
1f86cb3 chore(build): auto-generate vimdoc (22 hours ago)
3cffb2a docs: added change detection to the readme (22 hours ago)
6c767a6 feat: added options to configure change detection. Fixes #32 (22 hours ago)
cd162f3 chore(build): auto-generate vimdoc (22 hours ago)
941df31 feat(ui): make the windoww size configurable. Fixes #34 (22 hours ago)
5298441 fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 (23 hours ago)
2927b05 docs: added lincense (23 hours ago)
4d78203 chore(main): release 5.0.1 (#17) (24 hours ago)
1371a14 fix(build): use the shell to execute build commands (24 hours ago)
ffabe91 fix(cache): if mod is loaded already in the loader, then return that (25 hours ago)
316503f fix: dont autoload cached modules when module=false (25 hours ago)
992c679 fix: always set Config.me regardless of reset rtp (25 hours ago)
df6c986 fix: add neovim libs to rtp for treesitter parsers etc (26 hours ago)
49b69b7 chore(build): auto-generate vimdoc (27 hours ago)
e9d3a73 fix: default logs are now since 3 days ago to be in line with the docs (27 hours ago)
4234322 chore(build): auto-generate vimdoc (27 hours ago)
6e32759 fix: deepcopy lazyspec before processing (27 hours ago)
ec0f8d0 docs: added config.dev.path to the example (28 hours ago)
6404d42 fix: move re-sourcing check to the top (28 hours ago)
ddf36d7 fix: checker should not error on non-existing dirs (28 hours ago)
50ba619 test: fix tests (28 hours ago)
f78d8bf fix: show error when merging, but continue (28 hours ago)
b8a0055 chore(build): auto-generate vimdoc (29 hours ago)
1754056 fix: use jobstart instead of system to open urls (29 hours ago)
5ecc988 docs: use https to bootstrap lazy (29 hours ago)
ae644a6 fix: only run updated checker for installed plugins. Fixes #16 (29 hours ago)
7225b05 chore(build): auto-generate vimdoc (30 hours ago)
17fd57a docs: added docs for statusline and count (30 hours ago)
48a596e chore(build): auto-generate vimdoc (30 hours ago)
dfe8a65 docs: removed extra performance section (30 hours ago)
1fa2d87 docs: moved my dots to structuring plugins (30 hours ago)
9916318 chore(build): auto-generate vimdoc (30 hours ago)
abe026a docs: added section on performance (30 hours ago)
82aea47 chore(build): auto-generate vimdoc (31 hours ago)
72d66cd docs: updated lua stuff (31 hours ago)
ca43018 chore(build): auto-generate vimdoc (31 hours ago)
36cb7ea docs: migration guide (31 hours ago)
2f59ead chore(main): release 5.0.0 (#12) (31 hours ago)
dbcf675 chore(build): auto-generate vimdoc (31 hours ago)
b906ad9 docs: added windows to supported platforms (31 hours ago)
cb87aa3 ci: run tests on linux only for nw (32 hours ago)
75a36f3 chore(build): auto-generate vimdoc (33 hours ago)
af87108 fix(util): fixed double slashes (33 hours ago)
62c1542 fix(cache): normalize paths (33 hours ago)
bb1c2f4 feat: added support for Windows (34 hours ago)
198963f feat: utility method to normalize a path (34 hours ago)
a189883 fix: check for installed plugins with plain find (34 hours ago)
833b387 chore(build): auto-generate vimdoc (2 days ago)
ff89319 docs: removed dots from features (2 days ago)
b7bf18a style: spelling (2 days ago)
66dad89 chore(build): auto-generate vimdoc (2 days ago)
0c0b8b7 docs: todo (2 days ago)
92fd0d4 docs: updated installation and structuring plugins (2 days ago)
1baa92f docs: added docs on <cr> and <K> (2 days ago)
d827d8a docs: collapse semver examples (2 days ago)
1e16363 chore(build): auto-generate vimdoc (2 days ago)
980cfa9 docs: added config example when not using a Nerd Font (2 days ago)
713dcb6 build: added markdownlint config (2 days ago)
706fe6f chore(build): auto-generate vimdoc (2 days ago)
5ed9855 feat: added completion for all lazy commands (2 days ago)
b462787 docs: added optional plugins to docs for commands and methods (2 days ago)
f29f3d2 chore(build): auto-generate vimdoc (2 days ago)
1efa710 feat: added module=false to skip auto-loading of plugins on require (2 days ago)
55d194c chore(build): auto-generate vimdoc (2 days ago)
bac34cc docs: added section on uninstalling (2 days ago)
c065ca2 chore(build): auto-generate vimdoc (2 days ago)
2dd6230 feat: added :Lazy load foobar.nvim to load a plugin (2 days ago)
8a0da3b config: move lazy cache to state/nvim/lazy/cache (2 days ago)
7eb6034 chore(build): auto-generate vimdoc (2 days ago)
6567580 chore: todo (2 days ago)
6f00cde docs: typos (2 days ago)
faac2dd perf(cache): cache loadfile and no find modpaths without package.loaders (2 days ago)
32f2b71 fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise (2 days ago)
1fe43f3 fix(ui): focus Lazy window when auto-installing plugins in VimEnter (2 days ago)
d4aee27 feat!: removed the LazyUpdate etc commands. sub-commands only from now on (2 days ago)
b89e6bf perf: lazy-load the commands available on the lazy module (3 days ago)

Log (10)
○ LuaSnip
5570fd7 Auto generate docs (21 hours ago)
618b945 log: don't print a message on every start, provide log.ping() instead. (21 hours ago)

○ formatter.nvim
    8a4c961 Add configuration for standardrb (#212) (31 minutes ago)
    31a0ee7 Fix lua-format args (#214) (31 minutes ago)
    9aaf855 feat: add support for PHP-CS-Fixer (#216) (32 minutes ago)
    c7d7d90 feat: add nix formatting support (#217) (33 minutes ago)
    369e35b Use `--stderr` flag for rubocop rather than parsing output (#210) (33 minutes ago)

○ gitsigns.nvim
    2ab3bdf fix(blame): #697 (2 days ago)

○ neodev.nvim
    c5f0a81 chore: auto-generated types for Neovim nightly (10 hours ago)
    f8b17d3 chore: auto-generated types for Neovim nightly (34 hours ago)

● noice.nvim 10.51ms  VeryLazy
    585d24e fix(health): dont use nvim-treesitter to check if a lang exists (80 minutes ago)
    81269c5 ci: added .repro to .gitignore (2 hours ago)
    044767a fix: dont error in checkhealth if nvim-treesitter is not installed (2 hours ago)
    4e03e16 chore(main): release 1.5.0 (#269) (2 hours ago)
    d833d5e chore(build): auto-generate vimdoc (2 hours ago)
    aa68eb6 feat(format): allow `config.format.level.icons` to be false. Fixes #274 (2 hours ago)
    e4a4290 chore(build): auto-generate vimdoc (2 days ago)
    29a2e05 feat: added `Filter.cond` to conditionally use a route (2 days ago)

● nui.nvim 0.33ms   noice.nvim
    b12db53 fix(layout): process split layout box change (11 hours ago)
    51721a4 fix(layout): process float layout box change (11 hours ago)
    96ef1cb feat(split): store id internally (11 hours ago)

○ nvim-dap
    284c754 Stop resizing widgets if converted to non-float window (2 days ago)
    3971d9b Allow opening multiple frames or scopes widgets (2 days ago)

○ nvim-lspconfig
    5292d60 docs: update server_configurations.md skip-checks: true (14 hours ago)
    f70a094 fix: rename ruff-lsp to ruff_lsp (#2337) (14 hours ago)
    80e81b1 docs: update server_configurations.md skip-checks: true (14 hours ago)
    d8a4493 chore: remove `languageFeatures`, `documentFeatures` (#2336) (14 hours ago)
    baab771 docs: update server_configurations.md skip-checks: true (15 hours ago)
    4e13145 feat: add ruff-lsp support (#2335) (15 hours ago)
    d597b0f fix: send the lsp method request after insert workspace folders (#2330) (34 hours ago)
    1ab2720 docs: update server_configurations.md skip-checks: true (34 hours ago)
    9c70f37 feat: add jq support (#2333) (34 hours ago)
    259729c docs: update server_configurations.md skip-checks: true (2 days ago)
    aa22008 feat: add uvl support (#2331) (2 days ago)
    dd9e7f9 fix(gdscript): support get the port from env variable (#2313) (2 days ago)
    22c87d6 build(rockspec): fix rockspec package name (2 days ago)

● nvim-treesitter 52.02ms   nvim-treesitter-refactor
    770c66d Update parsers: v (4 hours ago)
    87dd482 fix(health): align the list of parsers when doing checkhealth (4 hours ago)
    ca09752 Update parsers: c_sharp, gdscript, sql (8 hours ago)
    eedb7b9 csharp: update query to parser change (33 hours ago)
    8498ebd Update parsers: c_sharp, jsonnet, query (33 hours ago)
    6e37050 Update parsers: swift (2 days ago)
    a75aded highlights(java): fix '!',param,global group (3 days ago)

○ telescope.nvim
    e960efa fix: jumplist picker indexing the line after (#2273) (5 hours ago)
    d16581e fix: misidentification invert and files_with_matches (#2240) (#2262) (8 hours ago)
    278c797 fix(builtin.live_grep): add spacer ":" even when coordinates disabled (#2275) (8 hours ago)

Clean (11)
○ colorscheme_switcher
○ friendly-snippets
○ lense.nvim
○ neocomplete.nvim
○ neorg-context
○ neorg-kanban
○ neorg-telescope
○ neorg-zettelkasten
○ nvim-cmp
○ nvim-treehopper
● which-key.nvim 90.63ms  LazyLoad

Loaded (6)
● heirline.nvim 5.26ms  start
● nvim-notify 0.2ms  noice.nvim
● nvim-treesitter-endwise 1.76ms  nvim-treesitter
● nvim-treesitter-refactor 57.96ms  LazyLoad
● nvim-treesitter-textobjects 21.98ms  nvim-treesitter
● playground 1.67ms  nvim-treesitter

Installed (32)
○ Comment.nvim
○ bufferline.nvim
○ cmp-emoji
○ cmp-latex-symbols
○ cmp-nvim-lsp
○ cmp-nvim-lua
○ cmp-path
○ cmp_luasnip
○ dirbuf.nvim
○ gitlinker.nvim
○ indent-blankline.nvim
○ jeskape.nvim
○ lightspeed.nvim
○ luv-vimdocs
○ nabla.nvim
○ neogen
○ neorg
○ nvim-autopairs
○ nvim-colorizer.lua
○ nvim-dap-ui
○ nvim-dap-virtual-text
○ nvim-surround
○ nvim-web-devicons
○ one-small-step-for-vimkind
○ paperplanes.nvim
○ plenary.nvim
○ rust-tools.nvim
○ ssr.nvim
○ telescope-file-browser.nvim
○ telescope-fzf-native.nvim
○ toggleterm.nvim
○ trouble.nvim

repro.lua
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
vim.g.mapleader = " "

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "--single-branch",
        "https://github.com/folke/lazy.nvim.git",
        lazypath,
    })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    "folke/tokyonight.nvim",
    {
        "folke/which-key.nvim",
        config = function()
            require("which-key").register({

                c = {
                    name = " Comment",
                    c = { "Toggle Line" },
                },
            }, {
                prefix = "<leader>",
                mode = "n",
            })
        end,
    },
    {
        "numToStr/Comment.nvim",
        keys = { "<leader>c", "gb" },
        config = function()
            require("comment").setup({
                toggler = {
                    ---line-comment keymap
                    line = "<leader>cc",
                    ---block-comment keymap
                    block = "gbc",
                },

                ---LHS of operator-pending mappings in NORMAL + VISUAL mode
                opleader = {
                    ---line-comment keymap
                    line = "<leader>c",
                    ---block-comment keymap
                    block = "gb",
                },
                mappings = {
                    -- extended = true,
                },
            })
        end,
    },
    -- add any other pugins here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
vim.cmd.colorscheme("tokyonight")

two other things:

  1. add the repro.lua fold thing like I did to this issue template
  2. perhaps rethink the root in repro. because people don't expect the plugins to be cloned into their current directory (at least I didn't)

plugin using version always marked with "updates available"

I'm installing bufferline:

  {
    'akinsho/bufferline.nvim',
    version = '^3',
    config = function()
      require 'user.plugins.bufferline'
    end,
  },

but for some reason, even though the tag doesn't change (v.3.1.0 as of writing this post), every check says that there are updates to this plugin.

reproduced with minimal configurations:

minimal.lua
local function join_paths(...)
  local result = table.concat({ ... }, '/')
  return result
end

local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp'
local package_root = join_paths(temp_dir, 'nvim', 'site', 'lazy')
local lazypath = join_paths(temp_dir, 'nvim', 'site') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)

require('lazy').setup({
{
'akinsho/bufferline.nvim',
version = '^3',
config = function()
require 'user.plugins.bufferline'
end,
},
}, {
root = package_root,
})

add option to add custom directories to runtime path

Is your feature request related to a problem? Please describe.
I use cheovim and it doesn't work because only my config folder but not ~/.config/nvim is added to runtime path.

Describe the solution you'd like
allow adding some directories manually to runtime path

Describe alternatives you've considered
don't use cheovim
(would be really sad)

Additional context
https://github.com/NTBBloodbath/cheovim

FR: bigger window (accessibility)

Is your feature request related to a problem? Please describe.
The window for lazy.nvim is smaller than it has to be. I have a small screen and bigger font size (bad eyes...), and lazy.nvim only takes up a smaller portion of the available space, making everything very crowded.

Pasted image 2022-12-20 19 13 19

Describe the solution you'd like
Either a bigger window by default, or a ui-config to enlarge the window

Describe alternatives you've considered
Zooming out, but that decreases font size.

Setting keymaps in init function not working

neovim 0.8.1

In lua/plugins/telescope.lua I have the following.

defining the keymaps in the init function is not working (no errors).

When I type :Telescope find_files the telescope window opens.
Why are the keymaps not working?

local M = {
  'nvim-telescope/telescope.nvim',
  cmd = { "Telescope" },
  dependencies = {
    'nvim-lua/plenary.nvim',
  },
}
function M.config()
  -- enable delete of buffers
  require("telescope").setup {
    pickers = {
      buffers = {
        mappings = {
          i = {
            ["<c-d>"] = "delete_buffer",
          }
        }
      }
    }
  }

end

function M.init()
  vim.keymap.set('n', '<leader>o', '<cmd>Telescope find_files<cr>')
end

return M

plugin object must start with a string or lua error is produced

Describe the bug
When specifying the list of plugins, if the first entry isn't a string, it produces a lua LSP diagnostic error:

The following is fine:

require("lazy").setup({
    "path_to/plugin.nvim",
})

This produces an error:

require("lazy").setup({
    { "path_to/plugin.nvim", dependencies = { ... }},
})

The LSP diagnostic error:

Cannot assign `table` to `string`-`table` cannot match `string`- Type `table` cannot match `string`

Full configuration I'm using:

require("lazy").setup({
	-- LSP Core
	{
		"VonHeikemen/lsp-zero.nvim",
		dependencies = {
			-- LSP
			"neovim/nvim-lspconfig",
			"williamboman/mason.nvim",
			"williamboman/mason-lspconfig.nvim",

			-- Installer
			"WhoIsSethDaniel/mason-tool-installer.nvim",

			-- Completion
			"hrsh7th/nvim-cmp",
			"hrsh7th/cmp-buffer",
			"hrsh7th/cmp-path",
			"saadparwaiz1/cmp_luasnip",
			"hrsh7th/cmp-nvim-lsp",
			"hrsh7th/cmp-nvim-lua",

			-- Snippets
			"L3MON4D3/LuaSnip",
			"rafamadriz/friendly-snippets",
		},
	},
	-- LSP Diagnostics
	{ "folke/trouble.nvim", dependencies = { "kyazdani42/nvim-web-devicons" } },

	-- LSP Formattting
	{ "jose-elias-alvarez/null-ls.nvim", dependencies = { "nvim-lua/plenary.nvim" } },

	-- Debugging
	{ "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" } },
	{ "leoluz/nvim-dap-go", depdencies = { "mfussenegger/nvim-dap" } },
	{ "mfussenegger/nvim-dap-python", dependencies = { "mfussenegger/nvim-dap" } },

	{ "chriskempson/base16-vim" },
	{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
	{
		"nvim-telescope/telescope-fzf-native.nvim",
		dependencies = { "nvim-telescope/telescope.nvim" },
		build = "make",
	},
	{ "nvim-telescope/telescope-file-browser.nvim", dependencies = { "nvim-telescope/telescope.nvim" } },
	{ "nvim-telescope/telescope-packer.nvim", dependencies = { "nvim-telescope/telescope.nvim" } },
	{ "nvim-treesitter/nvim-treesitter" },
	{
		"nvim-neo-tree/neo-tree.nvim",
		branch = "v2.x",
		dependencies = { "nvim-lua/plenary.nvim", "kyazdani42/nvim-web-devicons", "MunifTanjim/nui.nvim" },
	},
	{ "lewis6991/gitsigns.nvim" },
	{ "feline-nvim/feline.nvim", dependencies = { "kyazdani42/nvim-web-devicons" } },
	{ "DaikyXendo/nvim-material-icon" },

	-- Visual
	{ "mbbill/undotree" },

	-- Window Management
	{ "anuvyklack/windows.nvim", dependencies = { "anuvyklack/middleclass", "anuvyklack/animation.nvim" } },

	-- Help
	{ "folke/which-key.nvim" },
}, { ui = { border = "single" } })

Which version of Neovim are you using?
Latest stable 0.8.1

To Reproduce
Steps to reproduce the behavior:

  1. Call plugin setup and use an object as the first entry.

Expected Behavior
No LUA or LSP errors indicating the value being passed to setup is wrong.

Screenshots
If applicable, add screenshots to help explain your problem.

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

High RAM consumption during initialization

Is your feature request related to a problem? Please describe.
lazy.nvim can cause the nvim process to use up 1-2 GB of RAM during the first initialization.
This caused my dusty old PC to lock up for a few minutes. I've set concurrency to 5, so I don't think git is the cause.
After closing the Lazy popup window, the memory is instantly freed. Memory usage of the syncs afterwards is normal (so far).
I've never had this problem with packer. What is causing this high memory consumption?

Describe the solution you'd like
A more efficient RAM usage during the first startup.

Error when removing a plugin

Describe the bug
Pressing x to remove an installed plugin throws an error, but the operation succeeds.

Which version of Neovim are you using?
NVIM v0.9.0-dev-519+g2d8bbe468 nightly

To Reproduce
Steps to reproduce the behavior:

  1. Install a plugin
  2. Open :Lazy
  3. Find the plugin move cursor on top of the plugin's name and press x

Expected Behavior
The plugin should be just deleted, no errors.

Screenshots
Screenshot from 2022-12-20 12-52-57

Packer "after" alternative

In packer we have 2 options to define sequencing. First is require which analogous to dependencies in lazy.nvim.
Another is after, which looks like
use { "pluginA" }

use {
"pluginB",
after = "pluginA"
}

Is there any alternative to for "after" option ?

I tried to used dependencies, and it gave some merging plugins not supported error.

Also, dependencies will load "pluginA", but after will load only after "pluginB" is loaded, so pluginA loading takes a preference here

Generates invalid helptags for README

Describe the bug
After installing mason-null-ls.nvim, I tried using Lazy's feature of generating help tags when no are present in a plugin. While :help mason-null-ls<tab> shows plenty, which correlate perfectly with the headers in its README, one can't open them: "Tag not found: mason-null-ls.nvim-setup@en". Notably, that "@en" isn't present in the completions.

Which version of Neovim are you using?

❯ nvim --version 
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui

To Reproduce
Steps to reproduce the behavior:

  1. Use repro.lua below
  2. Wait for Lazy to install
  3. :h mason-null-ls.nvim-setup
  4. E426: tag not found: mason-null-ls.nvim-setup@en

Expected Behavior
Opens Readme at Nvim Setup heading.

Details

Lazy log

lazy.nvim (H) Install (I) Update (U) Sync (S) Clean (X) Check (C) Log (L) Restore (R) Profile (P) Debug (D) Help (?)

Total: 5 plugins

Breaking Changes (1)
● lazy.nvim 2.56ms  init.lua
b7c489b fix(loader): lua modules can be links instead of files. Fixes #66 (16 minutes ago)
7a57ea2 chore(build): auto-generate vimdoc (36 minutes ago)
c228908 fix(health): don't show warning on module=false (37 minutes ago)
b68f94b ci: Update issue templates (65 minutes ago)
bbebb67 ci: Update issue templates (67 minutes ago)
95fc814 chore(build): auto-generate vimdoc (84 minutes ago)
876f7bd feat(loader): allow to add extra paths to rtp reset. Fixes #64 (85 minutes ago)
a345649 fix(cache): if we can't load from the cache modpath, find path again instead of erroring right away (2 hours ago)
bbace14 fix(git): only mark a plugin as dirty if an update changed the commit HEAD. Fixes #62 (2 hours ago)
a939243 fix(checker): allow git checks only for non-pinned plugins (#61) (2 hours ago)
57bea32 chore(build): auto-generate vimdoc (2 hours ago)
ff24f49 fix(loader): source rtp /plugin files after loading start plugins. Fixes (2 hours ago)
b802729 chore(build): auto-generate vimdoc (5 hours ago)
9dfefac docs: fixed indentation of auto-generated code blocks (5 hours ago)
71b2e2f docs: lazy works on all OSs now (5 hours ago)
232232d fix(ui): install command can have plugins as a parameter (5 hours ago)
4ca3039 feat(loader): warn when mapleader is changed after init (6 hours ago)
540847b fix: strip / from dirs. Fixes #60 (6 hours ago)
86eaa11 fix(git): dereference tag refs. Fixes #54 (7 hours ago)
e95da35 feat(util): utility method to get sync process output (7 hours ago)
3c3a711 chore(build): auto-generate vimdoc (8 hours ago)
44f80a7 feat(plugin): allow plugin files only without a main plugin module. Fixes #53 (8 hours ago)
f5734f5 chore(build): auto-generate vimdoc (8 hours ago)
3814883 fix(ui): set current win only when its valid (8 hours ago)
3a7b8c8 chore(main): release 5.1.0 (#30) (17 hours ago)
3606d62 fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 (17 hours ago)
b193f96 fix(spec): only process a spec once (18 hours ago)
7be46bc style: removed unused requires (18 hours ago)
897d6df fix: add filetype to window buffer. (#41) (19 hours ago)
14300b3 chore(build): auto-generate vimdoc (19 hours ago)
78e9d6c docs: add a note about mapleader (19 hours ago)
06ac8bd perf(ui): clear existing extmarks before rendering (20 hours ago)
ffcd0ab fix(loader): source filetype.lua before plugins. Fixes #35 (20 hours ago)
9d12cdc fix(git): don't run git log for submodules. Fixes #33 (21 hours ago)
06ffcf5 chore(build): auto-generate vimdoc (21 hours ago)
7fb0652 docs: added docs on update checker (21 hours ago)
1f86cb3 chore(build): auto-generate vimdoc (21 hours ago)
3cffb2a docs: added change detection to the readme (21 hours ago)
6c767a6 feat: added options to configure change detection. Fixes #32 (21 hours ago)
cd162f3 chore(build): auto-generate vimdoc (21 hours ago)
941df31 feat(ui): make the windoww size configurable. Fixes #34 (21 hours ago)
5298441 fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 (22 hours ago)
2927b05 docs: added lincense (23 hours ago)
4d78203 chore(main): release 5.0.1 (#17) (24 hours ago)
1371a14 fix(build): use the shell to execute build commands (24 hours ago)
ffabe91 fix(cache): if mod is loaded already in the loader, then return that (24 hours ago)
316503f fix: dont autoload cached modules when module=false (25 hours ago)
992c679 fix: always set Config.me regardless of reset rtp (25 hours ago)
df6c986 fix: add neovim libs to rtp for treesitter parsers etc (26 hours ago)
49b69b7 chore(build): auto-generate vimdoc (27 hours ago)
e9d3a73 fix: default logs are now since 3 days ago to be in line with the docs (27 hours ago)
4234322 chore(build): auto-generate vimdoc (27 hours ago)
6e32759 fix: deepcopy lazyspec before processing (27 hours ago)
ec0f8d0 docs: added config.dev.path to the example (27 hours ago)
6404d42 fix: move re-sourcing check to the top (27 hours ago)
ddf36d7 fix: checker should not error on non-existing dirs (27 hours ago)
50ba619 test: fix tests (27 hours ago)
f78d8bf fix: show error when merging, but continue (27 hours ago)
b8a0055 chore(build): auto-generate vimdoc (28 hours ago)
1754056 fix: use jobstart instead of system to open urls (28 hours ago)
5ecc988 docs: use https to bootstrap lazy (28 hours ago)
ae644a6 fix: only run updated checker for installed plugins. Fixes #16 (29 hours ago)
7225b05 chore(build): auto-generate vimdoc (29 hours ago)
17fd57a docs: added docs for statusline and count (29 hours ago)
48a596e chore(build): auto-generate vimdoc (30 hours ago)
dfe8a65 docs: removed extra performance section (30 hours ago)
1fa2d87 docs: moved my dots to structuring plugins (30 hours ago)
9916318 chore(build): auto-generate vimdoc (30 hours ago)
abe026a docs: added section on performance (30 hours ago)
82aea47 chore(build): auto-generate vimdoc (30 hours ago)
72d66cd docs: updated lua stuff (30 hours ago)
ca43018 chore(build): auto-generate vimdoc (30 hours ago)
36cb7ea docs: migration guide (30 hours ago)
2f59ead chore(main): release 5.0.0 (#12) (30 hours ago)
dbcf675 chore(build): auto-generate vimdoc (30 hours ago)
b906ad9 docs: added windows to supported platforms (30 hours ago)
cb87aa3 ci: run tests on linux only for nw (32 hours ago)
75a36f3 chore(build): auto-generate vimdoc (32 hours ago)
af87108 fix(util): fixed double slashes (32 hours ago)
62c1542 fix(cache): normalize paths (32 hours ago)
bb1c2f4 feat: added support for Windows (33 hours ago)
198963f feat: utility method to normalize a path (33 hours ago)
a189883 fix: check for installed plugins with plain find (33 hours ago)
833b387 chore(build): auto-generate vimdoc (2 days ago)
ff89319 docs: removed dots from features (2 days ago)
b7bf18a style: spelling (2 days ago)
66dad89 chore(build): auto-generate vimdoc (2 days ago)
0c0b8b7 docs: todo (2 days ago)
92fd0d4 docs: updated installation and structuring plugins (2 days ago)
1baa92f docs: added docs on <cr> and <K> (2 days ago)
d827d8a docs: collapse semver examples (2 days ago)
1e16363 chore(build): auto-generate vimdoc (2 days ago)
980cfa9 docs: added config example when not using a Nerd Font (2 days ago)
713dcb6 build: added markdownlint config (2 days ago)
706fe6f chore(build): auto-generate vimdoc (2 days ago)
5ed9855 feat: added completion for all lazy commands (2 days ago)
b462787 docs: added optional plugins to docs for commands and methods (2 days ago)
f29f3d2 chore(build): auto-generate vimdoc (2 days ago)
1efa710 feat: added module=false to skip auto-loading of plugins on require (2 days ago)
55d194c chore(build): auto-generate vimdoc (2 days ago)
bac34cc docs: added section on uninstalling (2 days ago)
c065ca2 chore(build): auto-generate vimdoc (2 days ago)
2dd6230 feat: added :Lazy load foobar.nvim to load a plugin (2 days ago)
8a0da3b config: move lazy cache to state/nvim/lazy/cache (2 days ago)
7eb6034 chore(build): auto-generate vimdoc (2 days ago)
6567580 chore: todo (2 days ago)
6f00cde docs: typos (2 days ago)
faac2dd perf(cache): cache loadfile and no find modpaths without package.loaders (2 days ago)
32f2b71 fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise (2 days ago)
1fe43f3 fix(ui): focus Lazy window when auto-installing plugins in VimEnter (2 days ago)
d4aee27 feat!: removed the LazyUpdate etc commands. sub-commands only from now on (2 days ago)
b89e6bf perf: lazy-load the commands available on the lazy module (3 days ago)

Log (2)
● mason.nvim 0.02ms  start
28408c8 Revert "fix(spawn): always expand cmd if PATH is not modified (#773)" (#783) (3 hours ago)
8240d7d fix(powershell): use pwsh if available (#782) (5 hours ago)
dd04b41 fix(spawn): always expand cmd if PATH is not modified (#773) (26 hours ago)
f21b829 chore: update generated code (#780) (30 hours ago)
d265534 feat(expr): use same context for value & filter evaluation (#778) (32 hours ago)
2531376 feat(functional): add trim_start and assoc (#779) (32 hours ago)
ca77c84 feat: add expr module (#775) (2 days ago)
3ccd16b feat(registry): add nil (#774) (2 days ago)
582fe9e feat(functional): add list.reduce (#772) (2 days ago)
2db93f7 fix(functional): spread function args in _.apply (#770) (2 days ago)
e1556b8 Revert "chore: use pwsh instead of powershell (#706)" (#769) (2 days ago)
20eedd7 chore: update generated code (#768) (2 days ago)

● null-ls.nvim 0.1ms  start
    db1c7cb chore: autogen metadata and docs (2 days ago)
    6c80a53 feat: add `standardts` builtin formatting (#1303) (2 days ago)
    52fe59b chore: autogen metadata and docs (2 days ago)
    45cdd7c feat(builtins): add gomodifytags support in code actions (#1294) (2 days ago)
    f1182c2 refactor: use native neovim 0.8 fs utils (#1166) (3 days ago)

Clean (1)
○ lazy.nvim

Loaded (1)
● mason-null-ls.nvim 0.03ms  start

repro.lua
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"--single-branch",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	"williamboman/mason.nvim",
	"jose-elias-alvarez/null-ls.nvim",
	"jayp0521/mason-null-ls.nvim",
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
state/nvim/lazy/readme/doc/mason-null-ls.nvim.md
`mason-null-ls` bridges `mason.nvim` with the `null-ls` plugin - making it easier to use both plugins together.


# Introduction

`mason-null-ls.nvim` closes some gaps that exist between `mason.nvim` and `null-ls`. Its main responsibilities are:

-   provide extra convenience APIs such as the `:NullLsInstall` command
-   allow you to (i) automatically install, and (ii) automatically set up a predefined list of sources
-   translate between `null-ls` source names and `mason.nvim` package names (e.g. `haml_lint` <-> `haml-lint`)

It is recommended to use this extension if you use `mason.nvim` and `null-ls`.
Please read the whole README.md before jumping to [Setup](#setup).

**Note: this plugin uses the `null-ls` source names in the APIs it exposes - not `mason.nvim` package names.


# Requirements

-   neovim `>= 0.7.0`
-   [`mason.nvim`](https://github.com/williamboman/mason.nvim)
-   [`null-ls.nvim`](https://github.com/jose-elias-alvarez/null-ls.nvim)


# Installation

## [Packer](https://github.com/wbthomason/packer.nvim)

```lua
use {
    "williamboman/mason.nvim",
    "jose-elias-alvarez/null-ls.nvim",
    "jayp0521/mason-null-ls.nvim",
}
```

## vim-plug

```vim
Plug 'williamboman/mason.nvim'
Plug 'jose-elias-alvarez/null-ls.nvim'
Plug 'jayp0521/mason-null-ls.nvim'
```

# Commands

Available after calling `setup`.

-   `:NullInstall [...]` - installs the provided sources
-   `:NullUninstall  ...` - uninstalls the provided sources


# Configuration

You may optionally configure certain behavior of `mason-null-ls.nvim` when calling the `.setup()` function. Refer to
the [default configuration](#default-configuration) for a list of all available settings.

Example:

```lua
require("mason-null-ls").setup({
    ensure_installed = { "stylua", "jq" }
})
```

## Default configuration

```lua
local DEFAULT_SETTINGS = {
    -- A list of sources to install if they're not already installed.
    -- This setting has no relation with the `automatic_installation` setting.
    ensure_installed = {},
    -- Run `require("null-ls").setup`.
    -- Will automatically install masons tools based on selected sources in `null-ls`.
    -- Can also be an exclusion list.
    -- Example: `automatic_installation = { exclude = { "rust_analyzer", "solargraph" } }`
    automatic_installation = false,

	-- Whether sources that are installed in mason should be automatically set up in null-ls.
	-- Removes the need to set up null-ls manually.
	-- Can either be:
	-- 	- false: Null-ls is not automatically registered.
	-- 	- true: Null-ls is automatically registered.
	-- 	- { types = { SOURCE_NAME = {TYPES} } }. Allows overriding default configuration.
	-- 	Ex: { types = { eslint_d = {'formatting'} } }
	automatic_setup = false,
}
```

# Automatic Setup Usage

Automatic Setup is a need feature that removes the need to configure `null-ls` for supported sources.
Sources found installed in `mason` will automatically be setup for null-ls.

## Example Config

```lua
require("mason").setup()
require("mason-null-ls").setup({
    automatic_setup = true,
})
```

See the Default Configuration section to understand how the default dap configs can be overriden.


# Setup handlers usage

The `setup_handlers()` function provides a dynamic way of setting up sources and any other needed logic, It can also do that during runtime.

**NOTE:** When setting `automatic_setup = true`, the handler function needs to be called at a minimum like:
`require 'mason-null-ls'.setup_handlers()`. When passing in a custom handler function for the the default or a source,
then the automatic_setup function one won't be invoked. See below to keep original functionality inside the custom handler.

```lua
local null_ls = require 'null-ls'

require ('mason-null-ls').setup({
    ensure_installed = {'stylua', 'jq'}
})

require 'mason-null-ls'.setup_handlers {
    function(source_name, methods)
      -- all sources with no handler get passed here
    end,
    stylua = function(source_name, methods)
      null_ls.register(null_ls.builtins.formatting.stylua)
    end,
}

-- will setup any installed and configured sources above
null_ls.setup()
```

# Setup

There are primarily 2 paths to setup.

## Primary Source of Truth is `mason-null-ls`

This involves making sure tools are installed through `mason-null-ls` when available.

```lua
require("mason").setup()
require("mason-null-ls").setup({
    ensure_installed = {
        -- Opt to list sources here, when available in mason.
    },
    automatic_installation = false,
    automatic_setup = true, -- Recommended, but optional
})
require("null-ls").setup(
    sources = {
        -- Anything not supported by mason.
    }
)

require 'mason-null-ls'.setup_handlers() -- If `automatic_setup` is true.
```


## Primary Source of Truth is `null-ls`.
```lua
require("mason").setup()
require("null-ls").setup(
    sources = {
        -- all sources go here.
    }
)
require("mason-null-ls").setup({
    ensure_installed = nil,
    automatic_installation = true,
    automatic_setup = false,
})
```

Note: This is my personal preference.


# Available Null-ls sources


| Filetype                                                                                                                              | Source name            |
|---------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| blade                                                                                                                                 | `blade_formatter`      |
| bzl                                                                                                                                   | `buildifier`           |
| c cpp                                                                                                                                 | `cpplint`              |
| c cpp cs java cuda                                                                                                                    | `clang_format`         |
| clj                                                                                                                                   | `joker`                |
| cs                                                                                                                                    | `csharpier`            |
| django jinja.html htmldjango                                                                                                          | `djlint`               |
| dockerfile                                                                                                                            | `hadolint`             |
| elm                                                                                                                                   | `elm_format`           |
| eruby                                                                                                                                 | `erb_lint`             |
| gitcommit                                                                                                                             | `gitlint`              |
| go                                                                                                                                    | `gofumpt`              |
| go                                                                                                                                    | `goimports`            |
| go                                                                                                                                    | `goimports_reviser`    |
| go                                                                                                                                    | `golangci_lint`        |
| go                                                                                                                                    | `golines`              |
| go                                                                                                                                    | `revive`               |
| go                                                                                                                                    | `staticcheck`          |
| haml                                                                                                                                  | `haml_lint`            |
| javascript typescript                                                                                                                 | `rome`                 |
| javascript javascriptreact typescript typescriptreact                                                                                 | `xo`                   |
| javascript javascriptreact typescript typescriptreact vue                                                                             | `eslint_d`             |
| javascript javascriptreact typescript typescriptreact vue css scss less html json jsonc yaml markdown markdown.mdx graphql handlebars | `prettier`             |
| javascript javascriptreact typescript typescriptreact vue css scss less html json jsonc yaml markdown markdown.mdx graphql handlebars | `prettierd`            |
| jinja.html htmldjango                                                                                                                 | `curlylint`            |
| json                                                                                                                                  | `fixjson`              |
| json                                                                                                                                  | `jq`                   |
| kotlin                                                                                                                                | `ktlint`               |
| lua                                                                                                                                   | `luacheck`             |
| lua                                                                                                                                   | `selene`               |
| lua                                                                                                                                   | `stylua`               |
| markdown                                                                                                                              | `alex`                 |
| markdown                                                                                                                              | `markdownlint`         |
| markdown                                                                                                                              | `write_good`           |
| markdown org                                                                                                                          | `cbfmt`                |
| markdown tex                                                                                                                          | `proselint`            |
| markdown tex asciidoc                                                                                                                 | `vale`                 |
| php                                                                                                                                   | `phpcbf`               |
| php                                                                                                                                   | `psalm`                |
| proto                                                                                                                                 | `buf`                  |
| proto                                                                                                                                 | `protolint`            |
| python                                                                                                                                | `autopep8`             |
| python                                                                                                                                | `black`                |
| python                                                                                                                                | `blue`                 |
| python                                                                                                                                | `flake8`               |
| python                                                                                                                                | `isort`                |
| python                                                                                                                                | `mypy`                 |
| python                                                                                                                                | `pylint`               |
| python                                                                                                                                | `vulture`              |
| python                                                                                                                                | `yapf`                 |
| ruby                                                                                                                                  | `rubocop`              |
| ruby                                                                                                                                  | `standardrb`           |
| sh                                                                                                                                    | `shellcheck`           |
| sh                                                                                                                                    | `shellharden`          |
| sh                                                                                                                                    | `shfmt`                |
| solidity                                                                                                                              | `solhint`              |
| sql                                                                                                                                   | `sqlfluff`             |
| sql                                                                                                                                   | `sql_formatter`        |
| toml                                                                                                                                  | `taplo`                |
| vim                                                                                                                                   | `vint`                 |
| yaml                                                                                                                                  | `actionlint`           |
| yaml                                                                                                                                  | `yamlfmt`              |
| yaml                                                                                                                                  | `yamllint`             |
| yaml json                                                                                                                             | `cfn_lint`             |
|                                                                                                                                       | `codespell`            |
|                                                                                                                                       | `cspell`               |
|                                                                                                                                       | `editorconfig_checker` |
|                                                                                                                                       | `misspell`             |
|                                                                                                                                       | `textlint`             |


state/nvim/lazy/readme/doc/tags
!_TAG_FILE_ENCODING	utf-8	//
mason-null-ls.nvim-introduction	mason-null-ls.nvim.md	/# Introduction
mason-null-ls.nvim-requirements	mason-null-ls.nvim.md	/# Requirements
mason-null-ls.nvim-installation	mason-null-ls.nvim.md	/# Installation
mason-null-ls.nvim-packer-https-github-com-wbthomason-packer-nvim	mason-null-ls.nvim.md	/## [Packer](https://github.com/wbthomason/packer.nvim)
mason-null-ls.nvim-vim-plug	mason-null-ls.nvim.md	/## vim-plug
mason-null-ls.nvim-commands	mason-null-ls.nvim.md	/# Commands
mason-null-ls.nvim-configuration	mason-null-ls.nvim.md	/# Configuration
mason-null-ls.nvim-default-configuration	mason-null-ls.nvim.md	/## Default configuration
mason-null-ls.nvim-automatic-setup-usage	mason-null-ls.nvim.md	/# Automatic Setup Usage
mason-null-ls.nvim-example-config	mason-null-ls.nvim.md	/## Example Config
mason-null-ls.nvim-setup-handlers-usage	mason-null-ls.nvim.md	/# Setup handlers usage
mason-null-ls.nvim-setup	mason-null-ls.nvim.md	/# Setup
mason-null-ls.nvim-primary-source-of-truth-is-mason-null-ls	mason-null-ls.nvim.md	/## Primary Source of Truth is `mason-null-ls`
mason-null-ls.nvim-primary-source-of-truth-is-null-ls	mason-null-ls.nvim.md	/## Primary Source of Truth is `null-ls`.
mason-null-ls.nvim-available-null-ls-sources	mason-null-ls.nvim.md	/# Available Null-ls sources

Is it possible to setup some plugins in the setup and then load module and submodules of plugins?

Is your feature request related to a problem? Please describe.
Hello!

I am thinking about migrating my Neovim configuration to this package manager but my Neovim configuration uses Fennel with hotpot.nvim. That means that I have some plugins that I must have installed before the plugins module can be compiled.

My idea is to do something like...

-- init.lua
require("lazy").setup({
  "rktjmp/hotpot.nvim",
  "conf.plugins",
})

...which would always install hotpot.nvim for me and then would use the compiled conf.plugins module.

Describe the solution you'd like
It would be ideal to be able to specify some plugins inside the init.lua file and a module containing plugins to load.

Describe alternatives you've considered
I have considered bootstrapping hotpot.nvim but I am not sure of what the best practice for this would be.

If I am able to do that I could load lazy.nvim inside fnl/conf/init.fnl.

Additional context
I have already setup a Lua demo configuration and I am loving this plugin. 😄

Accepting a string for the `config` property to load a module

Is your feature request related to a problem? Please describe.
Currently, config must be a function to configure the plugin:

{
  "nvim-treesitter/nvim-treesitter",
  build = ":TSUpdate",
  config = function()
    require("plugins.treesitter")
  end,
}

Describe the solution you'd like
Would you consider supporting a string instead of a function, i.e. config = "plugins.treesitter"? This would just be syntactic sugar for the code above.

{
  "nvim-treesitter/nvim-treesitter",
  build = ":TSUpdate",
  config = "plugins.treesitter",
}

This is similar to the setup function which allows both a table and a module name that gets loaded instead. And imo it looks cleaner when you move a lot of your config to other files.

Describe alternatives you've considered
None

Additional context
Great work, I'm really enjoying the new features and love the way the config looks with lazy.nvim!

Question/bug (?) regarding structuring plugins and the plugins directory

Describe the bug
Quoting the README:

Example:

  • ~/.config/nvim/init.lua
require("lazy").setup("plugins")
  • ~/.config/nvim/lua/plugins.lua or ~/.config/nvim/lua/plugins/init.lua
return {
  "folke/neodev.nvim",
    "folke/which-key.nvim",
    { "folke/neoconf.nvim", cmd = "Neoconf" },
}
  • any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

My question is: is step 2 (having plugins.lua or plugins/init.lua) necessary for step 3 (so that every plugins/*.lua file loads automatically)?

That seems to be the case because lazy is complaining that it cannot read .../plugins/init.lua.

Was wondering if this is a bug or intended behavior.

Which version of Neovim are you using?
Version 0.8.1

To Reproduce

  1. Create ~/.config/nvim/init.lua:
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'

if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    '--single-branch',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

local lazy = require('lazy')

lazy.setup('plugins')
  1. And create ~/.config/nvim/lua/plugins/my.lua:
return {
  'nvim-tree/nvim-web-devicons',
  url = 'https://github.com/nvim-tree/nvim-web-devicons',
}
  1. Open nvim, and there will be an error saying:
Failed to load **plugins**
....local/share/nvim/lazy/lazy.nvim/lua/lazy/core/cache.lua:105: cannot open /Users/farzadmf/.config/nvim/l
ua/plugins/init.lua: No such file or directory

Expected Behavior
Since I'm using those individual files to separate my plugins, it doesn't make much sense to me to have the init.lua file in there

Screenshots
If applicable, add screenshots to help explain your problem.

Log
:Lazy log shows:

Lazy log
Failed to load **plugins**
....local/share/nvim/lazy/lazy.nvim/lua/lazy/core/cache.lua:105: cannot open /Users/farzadmf/.config/nvim/l
ua/plugins/init.lua: No such file or directory

git submodules don't work

This plugin (mine) https://github.com/ilAYAli/scMRU.nvim works with Packer et al. but not with Lazy.
I followed this guide when I wrote it.
The mentioned sqlite3 lua rocks module is fairly old so I should probably just replace it. Regardless, other plugins might use a similar pattern, so the issue might be of interest.

Which version of Neovim are you using?
NVIM v0.8.0-1210-gd367ed9b2

Steps to reproduce the behavior:

Lazy fails during installation with a minimal config file.

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  'ilAYAli/scMRU.nvim',
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

:checkhealth and Lazy log does not contain any errors, but the following is printed to :messages

Failed to source `/Users/username/.local/share/nvim/lazy/scMRU.nvim/plugin/mru.vim`

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:185: Vim(lua):E5108: Error executing lua ...er/.local/share/nvim/lazy/scMRU.nvim/lua/mru/display.lua:1: module 'ljsqlite3' not found:
^Ino field package.preload['ljsqlite3']not found in lazy cache
^Ino file './ljsqlite3.lua'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/ljsqlite3.lua'
^Ino file '/usr/local/share/lua/5.1/ljsqlite3.lua'
^Ino file '/usr/local/share/lua/5.1/ljsqlite3/init.lua'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/ljsqlite3.lua'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/ljsqlite3/init.lua'
^Ino file '/Users/username/.local/share/nvim/lazy/scMRU.nvim/plugin/../lua/mru/deps/lua-ljsqlite3/init.lua'
^Ino file './ljsqlite3.so'
^Ino file '/usr/local/lib/lua/5.1/ljsqlite3.so'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/ljsqlite3.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'ljsqlite3 not found in lazy plugins
stack traceback:
^I[C]: in function 'require'
^I...er/.local/share/nvim/lazy/scMRU.nvim/lua/mru/display.lua:1: in main chunk
^I[C]: in function 'require'
^I...etter/.local/share/nvim/lazy/scMRU.nvim/lua/mru/init.lua:1: in main chunk
^I[C]: in function 'require'
^I[string ":lua"]:1: in main chunk
^I[C]: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:185: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:184>
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:77: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:184: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:178: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:149: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:133: in function 'load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:64: in function 'startup'
^I...etter/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:58: in function 'setup'
^I/Users/username/sync/config/nvim/init.lua:19: in main chunk

stacktrace:

Implicit lazyness by init functions is quite different behavior than packer lazyness on setup functions

Is your feature request related to a problem? Please describe.

I'm unsure whether it can be stated as a bug or feature request, or just docs clarification. packer.nvim also have implicit lazy loading when there's a setup function in a plugin spec, BUT, the plugin still loads despite having a setup function.

The trade-off there seems to lean towards more at setting up the plugin than complying with an strict implicit lazy loading rule. I think that's why there opt verb may be more on point than lazy, because a plugin spec with a setup function is still lazily loaded, it's installed on opt/, BUT, still loaded, BECAUSE opt = true has not been set, it's lazy, but not opt. You have to set opt = true for something to actually not be loaded.

Describe the solution you'd like

🤔

Describe alternatives you've considered

I had a bunch of plugins with setup functions which I expected to load, the setup was just for that, setting up, not implicitly causing opt = true. Migrating to lazy.nvim it seems I have to set lazy = false to achieve the same bare "setting up" behavior when setting up init functions. I hope it's all fine doing that.

Question: Why nvim-qt commands aren't showing?

Describe the bug

  • Neovim-qt commands aren't showing
  • When I'm not using lazy.nvim the nvim-qt commands are showing.
  • Here's my ginit.vim and lazy.lua.

Which version of Neovim are you using?
0.9.0-dev-525+ga7332ba9b

To Reproduce
Steps to reproduce the behavior:

  1. Open nvim-qt.
  2. Try to run nvim-qt commands.

Expected Behavior

  • nvim-qt commands should show up and run.

Screenshots.
Screenshot (1175)

Support non-normal keybinds

Is your feature request related to a problem? Please describe.
The ability to lazy load a plugin using non-normal keybinds would be pretty useful.

Describe the solution you'd like
Something similar to: wbthomason/packer.nvim#1063

{
  "a" -- normal mode
  { "i", "b" } -- insert mode
  v = "c" -- visual mode
  x = { "d", "e" } -- select mode
}

Describe alternatives you've considered
I think this can be somewhat achieved using manual mappings in init = ..., but something more declarative would be nice.

Question: Does this plugin manager make impatient.nvim obsolete?

From your README.md:

Great care has been taken to make the startup code (lazy.core) as efficient as possible. During startup, all lua files used before VimEnter or BufReadPre are byte-compiled and cached, similar to what impatient.nvim does.

I am just wondering if impatient.nvim is still doing anything if I'm using lazy.nvim? If I remove impatient.nvim I still get performance 2-3 times better than with packer.nvim + impatient.nvim.

Luarocks support

Hey folke, hope you're doing well!

I'm really excited to try lazy.nvim, it seems to be what I've been looking for and it saved me the trouble of doing it myself!

I was wondering if you thought about adding support for using rocks at some point. From what I understand some Neovim core maintainers were looking to make a standard using luarocks to host the plugins and their specs (dependencies, etc) to make everything easier to maintain for the end users, and I'm also working on a full incremental rewrite of rest.nvim which will need a rock in order to work.

If it's not in the plans, do you know of a way to do it on my own?

Cheers!

Doesn't work with rhysd/committia.vim

Describe the bug
I'm not sure if this should be opened in https://github.com/rhysd/committia.vim or in here.
After moving 99% of my plugins only this one is left which doesn't seem to be working, whether it's lazy-loaded or not.

Which version of Neovim are you using?
Neovim nightly latest

To Reproduce
Steps to reproduce the behavior:

  1. Install Lazy
  2. Add https://github.com/rhysd/committia.vim to plugins
  3. Open git commit view (git commit some staged files)

Expected Behavior
committia should be loaded and enabled in the git-commit buffer. (With packer it works)

snapshots

it would be cool if you could have named snapshots to which you can "revert" your plugins

this would basically just be an extension to the lockfiles I guess.
You'd be able to have multiple lockfiles and can restore the state from one of them

Adding `include` for sub-modules.

Is your feature request related to a problem? Please describe.
nvim-tressitter (and other extendible plugins) has tons of modules
and each module has basically the following form, if you want to add it to your
plugin-list:

{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
}

so if you have more than one module, your config file looks as follows:

{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
},
{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
},
{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
},
-- and so on

which... repeats a lot...

Describe the solution you'd like
Something like dependencies (for example: include) which should look like
this:

{
    "nvim-treesittter/nvim-treesitter",
    includes = {
        { <module1>, ...},
        <module2>,
        <module3>,
        -- ..
    },
    init = function()
        -- stuff
    end,
}

include (or any other name) should install the given list of plugins if and
only if the plugin above is installed as well!
This removes the requirement to add the same dependency again and again for each
module.

Describe alternatives you've considered

  1. Write each plugin with "dependencies" as above.
  2. Write everything down and assume that treesitter is always installed:
{
    "nvim-treesitter/nvim-treesitter",
    -- ...
}
<module1>,
<module2>,
-- ...

Additional context
Hi!

Better syntax for defining plugin tables

Currently a plugin definition looks like this :

 {
    "monaqa/dial.nvim",
    keys = { "<C-a>", "<C-x>" },
  },

I think it would look more readable if the

["monaqa/dial.nvim"] = {
   keys = { "<C-a>", "<C-x>" },
}

This might look trivial but when we have so many plugins, it looks more readable

example :

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.