Comments (16)
@savq I suggest having this example snippets in the readme. I have been try to make this work for a long time till now with the exact same plugin. It will be good to see an example of using run
in the readme and this plugin is also widely used so I bet a lot of users have hit the readme just like did but didn't find any useful example on run. The docs is good though , and I read it but it didn't mention anything on nvim/vim commands . Good job done at creating this simple yet powerful plugin package manager .
from paq-nvim.
Why not use vim.cmd
?
from paq-nvim.
from paq-nvim.
paq{ 'nvim-treesitter/nvim-treesitter', run=vim.cmd('TSUpdate') }
is all it should take. Or am I missing something
from paq-nvim.
from paq-nvim.
Ohhh, I didn't realize that's what you meant! That should work perfectly.
On Mon, May 31, 2021, 10:20 PM Gavinok @.***> wrote:
@kovasap https://github.com/kovasap
paq{ '', run=vim.cmd('TSUpdate') }
is all it should take. Or am I missing something
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#35 (comment), or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACC3NAQKNM7KKXLQHBN5P4LTQRUVVANCNFSM45YPSUMA
.
May want to close the issue if it is solved
from paq-nvim.
Sorry was replying on phone via email.
from paq-nvim.
paq{ 'nvim-treesitter/nvim-treesitter', run=vim.cmd('TSUpdate') }
This doesn't work because the function in run is called as soon as nvim is opened. I got around this by wrapping vim.cmd("TSUpdate")
in another function so I can write it like ... run = wrapper
, without parenthesis.
Otherwise you'd get an error:
Vim:E492: Not an editor command: TSUpdate
from paq-nvim.
Oh yes that makes sense! Thanks for the clarification.
from paq-nvim.
@Mrfiregem is correct. run
can take a function so to wrap :TSUpdate
one would write:
paq {'nvim-treesitter/nvim-treesitter', run=function() vim.cmd 'TSUpdate' end}
With the latest changes, the run
command will only run when there have actually been changes in the plugin repo,
so you might see the hook message a lot less often.
from paq-nvim.
I am trying to use the run command but get errors! (Neovim 0.7)
failed to run hook for fzf, failed to install fzf
failed to run hook for nvim-treesitter, failed to install fzf
Can anyone help?
require 'paq' {
'savq/paq-nvim',
'junegunn/fzf.vim',
{
'junegunn/fzf',
run = function()
vim.cmd './install --all'
end,
},
{
'nvim-treesitter/nvim-treesitter',
run = function()
vim.cmd 'TSUpdate'
end,
},
}
from paq-nvim.
@David-Else you should rather be doing something like this {"junegunn/fzf", run = vim.fn['fzf#install']()}
because from what https://github.com/junegunn/fzf#as-vim-plugin say you have to run fzf#install() which is an autoload fn and vim.fn is how to call autoload fn's in lua
from paq-nvim.
@Ultra-Code Thanks! Unfortunately I get this error:
E5113: Error while calling lua chunk: Vim:E117: Unknown function: fzf#install
stack traceback:
[C]: in function 'fzf#install'
Can you help? Cheers!
from paq-nvim.
@David-Else
It should be this instead
{
"junegunn/fzf",
run = function()
vim.fn["fzf#install"]()
end,
},
but this also gives the error below which shouldn't be so
detected an error while processing fzf#install:
línea 10
E605: the excepcion /usr/share/vim/vimfiles/install not found ,didn't get caught
I get this same error when I execute :call fzf#install()
but :call fzf#run(fzf#wrap({'source': 'ls'}))
works. I'm using NVIM v0.7.0 . I suggest you report this to fzf upstream. It looks like this isn't a lua or paq-nvim issue
The error is triggered by the line below in fzf#install. You can check the function with :verbose function fzf#install
if !executable(script)
throw script.' not found'
endif
from paq-nvim.
@Ultra-Code Cheers! I have just removed the plugin instead and will install it manually.
from paq-nvim.
@David-Else 😄 that works too
from paq-nvim.
Related Issues (20)
- PaqClean command removes all packages except paq-nvim HOT 2
- Add possibility to pass `opt true` on paq setup HOT 1
- 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
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.