Comments (1)
@savq thank you so much for this plugin.
I'm glad you find it useful!
i noticed you don't ever actually source/require/load your packages.lua in your dotfiles…
You're right, I don't source Paq on startup; like you said, I only do it when updating stuff. Using my dotfiles calling :lua require 'packages'
is enough to update everything.
I use it that way because Paq technically only creates the list of packages once, so if I remove something, Paq won't know unless I reload it (or restart nvim). Updates don't have that problem.
How do we know a plugin that is installed with paq is sourced/loaded to then set their config via lua too?
That's a pretty good question because… it depends. The vim component of a plugin works as usual (plugin, autoload, etc), and these plugins usually set global variables to avoid reloading, you can use those to know if the plugin is loaded. The Lua part of a plugin is never sourced automatically, so an all-Lua plugin is only loaded if you call require
.
Lua has a special table package.loaded
that lists all modules (and submodules) that have been defined, so to be sure foo
was sourced you'd have to do:
if not package.loaded['foo'] then
require('foo')
end
My dotfiles actually leverage that table, because that's how Plenary "reloads" packages, by nulling the entry in the package.loaded
.
This question also made me realise there was a small mistake in my dotfiles. I was calling require 'paq-nvim'
before calling reload_module
. So that's also fixed now, thanks 👍
from paq-nvim.
Related Issues (20)
- Feature Request: SSH HOT 2
- `opt = true` not respected HOT 2
- [Feature] custom commands for updating/installing HOT 3
- bug in bootstrapping docs HOT 1
- Repo owner not taken under consideration when trying to install plugin with same name
- [Feature Discussion] shorten way to call a `:Command` on `run`
- Unable to run setup hook for gitsigns HOT 3
- [Feature Request] Support for tagging certain versions HOT 1
- Synchronous plugins installation HOT 1
- What neovim version is paq trying to target? HOT 3
- Tracking issue for Paq 2.0 HOT 9
- Error when using extra parameters with plugins. HOT 2
- I can't get paq-nvim to work after following all the instructions. HOT 1
- Docs improvement ideas
- errors on first installation of `nvim-treesitter` HOT 5
- cur_hash is always euqal prev_hash, even if a package got updated, leaving the log file empty HOT 3
- question: how do i make a package require another package? HOT 2
- cannot use paq at all HOT 2
- Hide "Nothing to install" message on startup HOT 5
- PaqInstall get error message, but install success
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 paq-nvim.