You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm drudging through lazy.nvim documentation and I can't seem to find these things anywhere...
I would like to make a custom plugin. I want to be able to load it via lazy.nvim by passing it the table return {'test_picker', opts = {}}. I would like to not have the workflow tied to GitHub. Nearly every example I see has people writing custom plugins, pushing to github, and allowing Lazy.nvim to clone them down. I would just like to work out of a "local plugins" folder when working on this plugin.
First point of confusion: the dev config setting for Lazy.nvim
I'm getting warnings saying I'm using dev incorrectly ("Cannot assign table to boolean?"). Am I understanding the usage of dev correctly?
Second point of confusion: Dependencies
My plugin will depend on other dependencies being both installed and configured before it can load. How do I set up my plugin so it tells lazy.nvim that it depends on other plugins? I could accomplish this by making my plugin loading table:
return {
'testPicker',
dev=true,
opts= {},
dependencies= {
'plugins/thisDependsOn', -- I don't want this here. I want it defined in the plugin
}
}
But since these are default dependencies, I want that dependency to be captured in the plugin, not the implementation of the plugin. I see in the help docs that it says packages can define their dependencies with a lazy.lua file. Where does that go in the package structure, and what is that file supposed to look like? The only example I can seem to find of someone implementing a lazy.lua file is at folke/noice.nvim, but that leaves me with more questions than answers... is there some defined spec somewhere regarding how this lazy.lua file is supposed to be structured and where it is supposed to live within the project structure?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm drudging through lazy.nvim documentation and I can't seem to find these things anywhere...
I would like to make a custom plugin. I want to be able to load it via lazy.nvim by passing it the table
return {'test_picker', opts = {}}
. I would like to not have the workflow tied to GitHub. Nearly every example I see has people writing custom plugins, pushing to github, and allowing Lazy.nvim to clone them down. I would just like to work out of a "local plugins" folder when working on this plugin.First point of confusion: the dev config setting for Lazy.nvim
This is my Lazy.nvim setup:
I'm getting warnings saying I'm using dev incorrectly ("Cannot assign table to boolean?"). Am I understanding the usage of
dev
correctly?Second point of confusion: Dependencies
My plugin will depend on other dependencies being both installed and configured before it can load. How do I set up my plugin so it tells lazy.nvim that it depends on other plugins? I could accomplish this by making my plugin loading table:
But since these are default dependencies, I want that dependency to be captured in the plugin, not the implementation of the plugin. I see in the help docs that it says packages can define their dependencies with a
lazy.lua
file. Where does that go in the package structure, and what is that file supposed to look like? The only example I can seem to find of someone implementing a lazy.lua file is at folke/noice.nvim, but that leaves me with more questions than answers... is there some defined spec somewhere regarding how this lazy.lua file is supposed to be structured and where it is supposed to live within the project structure?For the record, my plugin structure is:
Beta Was this translation helpful? Give feedback.
All reactions