nvim-telescope / telescope-fzy-native.nvim

FZY style sorter that is compiled
MIT License
179 stars 8 forks source link

How to install with Paq (pure lua neovim package manager) #5

Closed sethidden closed 3 years ago

sethidden commented 3 years ago

I'm just opening an issue to immediately close it, because I thought somebody would have the same problem:

If you install this plugin with Paq, and try to register it with telescope, you'll get this error:

E5113: Error while calling lua chunk: .../start/telescope.nvim/lua/telescope/_extensions/init.lua:11: This extension doesn't exist or is not
 installed: fzy_native
...fzy-native.nvim/lua/telescope/_extensions/fzy_native.lua:8: Unable to find native fzy native lua dep file. Probably need to update submod
ules!
Press ENTER or type command to continue

The solution is to update submodules that are within this plugin after downloading it. This requires adding a Paq hook and looks like this:

vim.cmd 'packadd paq-nvim'
local paq = require('paq-nvim').paq
paq { 'nvim-telescope/telescope-fzy-native.nvim', run='git submodule update --init --recursive' } -- https://github.com/savq/paq-nvim/issues/6

This probably doesn't warrant changing the Wiki/Readme but it took me a while to figure out that Paq doesn't install submodules by default. The "make sure submodules are installed" in the Readme is on point.

Also linking: https://github.com/savq/paq-nvim/issues/6

Praise Telescopic Jesus