Comments (6)
The issue here is when a package is lazy-loaded, vim.cmd [[packadd ...]]
needs to be used prior to require()
. So what I may need to do is add vim.cmd [[ <pkg> ]]
to Vapour.utils.plugins.require_if_installed()
or something, because otherwise it'll just keep causing issues.
from vapournvim.
I think e67d293 fixes this for now. Maybe we can add a lazy load parameter to require_if_installed and if it is true then do vim.cmd('packadd ' .. pkg) or something like that?
from vapournvim.
I have implemented the checking for lazy loading in the require_if_installed function and tested it with treesitter and the markdown-preview.nvim plugin and it seems to be working fine.
from vapournvim.
I've tweaked the require_if_installed
function slightly since I started realizing not all repos are the module names, which is a little annoying. But I'll port your changes as well over.
I didn't say this yesterday as I was exhausted by the time, but I think just part of the issue is some need to not be lazy-loaded, while others do.
Locally how I have it now is which-key
is not lazy loaded, but for example NvimTree is. In the plugins conf it's loaded on :NvimTreeToggle
command, so when I do <leader>e
then it gets loaded without issue.
This might be a good safe way to go about this. Because doing packadd
imo defeats the purpose of lazy-loading. I just couldn't get it to work any other way prior, but I think the above is a sane approach.
Another reason why I think this issue is such a thing is because even though these various packages are lazy-loaded, they're still trying to be loaded outside of their trigger scope if you will (event
/cmd
), which is causing the issues. So I'll work with that, as we should just need to edit the plugins file to config = function () require'...' end
, which I've done in some situations already.
from vapournvim.
Now I get "which-key" not existing every time I start neovim. I am not sure if it is good or bad. Does this mean that it is getting lazy loaded?
from vapournvim.
Now I get "which-key" not existing every time I start neovim. I am not sure if it is good or bad. Does this mean that it is getting lazy loaded?
Yeah. I got that fixed in my modularize-vapour branch, the main thing I'm running into right now is auto-complete not working for some reason. So been trying to figure that out.
from vapournvim.
Related Issues (20)
- Mouse not working on bufferline HOT 2
- ZenMode not working
- Error detected when opening Config HOT 1
- Feature request: Please provide a way to set paste toggle HOT 1
- Color scheme partially stuck as rose-pine HOT 1
- Provide an option to disable autoformatting HOT 1
- clean install - null_ls failure
- Adding auxiliary plugin rust-tools to lsp_installer.on_server_ready
- Configuring null_ls
- Docs?
- How to load extensions or autoload required plugins
- "Black hole" Register mappings not working HOT 2
- Can not supress <A-j>, <A-k> keybinds
- Why I've not been maintaining this project HOT 1
- Minimum gcc 7 is required for nvim-treesitter
- Lsp config not found on fresh install - Mac HOT 4
- support | help? HOT 2
- File/Folder Icon not showing
- E492: Not an editor command: PackerSync HOT 2
- cmp deprecated function
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 vapournvim.