Comments (2)
will the function work based on the name of the plugin or the name of its Lua module
plugin name.
I just saw the proposal for the rocks-lazy module and its possible configuration. Would the proposal mentioned here serve to make things easier or will an internal wrapper be created in that module?
I think the rocks.nvim API should be as simple as possible.
That is, no lazy loading logic whatsoever. We just provide the API for loading the plugins manually, and the opt
config option that allows users to prevent rocks.nvim
from eagerly loading the plugins.
Any lazy loading logic and additional options should be the responsibility of the external module.
For example rocks-git.nvim
adds a bunch of fields (git
, rev
, build
, ...) to the rocks.toml schema. rocks.nvim
itself knows nothing about these fields. It simply sends the config to the injected handler, which detects if it has a git
field and does something with it.
from rocks.nvim.
To keep the lazy loading to just what is necessary, I think adding an opts table to the API function that accepts two possible arguments (ft
and event
) for faster integration could be nice. For example, to have nvim-lspconfig
loaded only on certain filetypes in which you have its LSP installed in your system. Here is an example
--- Load lspconfig only in the following filetypes
--- as I have installed their LSPs for daily use
rocks.api.load_plugin("lspconfig", {
ft = { "lua", "python", "haskell" },
})
Ps: will the function work based on the name of the plugin or the name of its Lua module (e.g. nvim-lspconfig
or lspconfig
)?
Edit: I don't think that both table options should coexist if implemented, I don't know if it could cause bugs in some plugins or create race conditions in some others.
Edit 2: I just saw the proposal for the rocks-lazy module and its possible configuration. Would the proposal mentioned here serve to make things easier or will an internal wrapper be created in that module?
from rocks.nvim.
Related Issues (20)
- [BUG]: Rocks sync keeps installing and uninstalling plugins if the name is not lower case HOT 6
- [Bug] `:Rocks sync` fails when there are no plugins in rocks.toml
- [Feature] Prompt to sync rocks if plugins cannot be loaded at startup HOT 2
- deprecate `rocks.api.source_runtime_dir` -> Extract to its own library HOT 1
- [Feature]: `:Rocks try` HOT 2
- Ensure luarocks operations complete cleanly when exiting neovim
- [Module] rocks-nix.nvim
- Processing of luarocks fails when cwd is rocks or plugin directory HOT 17
- :Rocks sync error logging is unhelpful HOT 4
- Rocks update fails HOT 3
- :Rocks log missing error HOT 3
- [Feature] Allow overriding or extending the luarocks config
- Plugins not starting HOT 3
- AUR install script
- [Enhancement] pin luarocks version / manage luarocks installation
- vim.tbl_islist is deprecated HOT 6
- [Module]: `rocks-format.nvim` HOT 1
- doesn't work on systems without libgcc_s.so.1 HOT 5
- [BUG] Breaking change in luarocks cmdline interface HOT 2
- [Bug] "Failed to remove symlink" error log
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocks.nvim.