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
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.
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.
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
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:
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
Write each plugin with "dependencies" as above.
Write everything down and assume that treesitter is always installed:
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
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?
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.
Describe alternatives you've considered
I think this can be somewhat achieved using manual mappings in init = ..., but something more declarative would be nice.
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)
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)
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.
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:
Clone github.com/rgruyters/nvim.git
checkout branch feature/lazy
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.
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
Log
Please include any related errors from the Noice log file. (open with :Lazy log)
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)
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.
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
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.
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:
cd ~/.config/ && mv nvim nvim.bak to remove any rtp stuff and have clean nvim folder
rm -rf ~/.config/local/share/nvim/lazy to remove any previous lazy stuff
rm -rf ~/.config/local/state/nvim/lazy to remove any previous lazy stuff
mkdir ~/.config/nvim && cd ~/.config/nvim to create fresh nvim folder
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
Currently, the plugin spec build runs every time you run :Lazy update. iirc, with packer, the equivalent run only did so when there has been actually has been an update to the plugin.
Note sure whether this is intended, but I think it would make sense to run build only when there actually is a new commit for the plugin?
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
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
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
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.
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)
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.
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.
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.
...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. 😄
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
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.
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.
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
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.
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!
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.
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.
: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
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
(forgive me for opening this issue, I don't had yet the time to migrate so I couldn't test)
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"
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)
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.
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.
`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 [
Is your feature request related to a problem? Please describe.
I'm porting my nvim config to lazy and am getting the "Config Change Detected. Reloading..." notification on every safe. I save a lot.
Describe the solution you'd like
An option that disables the notification and just updates the lazy index silently.