Open datwaft opened 4 years ago
Ah! I see what's going on here. The bad news is I'm not sure what should be done to fix it.
The line throwing the error is one which sources an updated (or just installed) plugin to make it available without a restart. As you guessed in #95, it seems like nvim-treesitter-refactor
is getting installed before nvim-treesitter
has completed installing (I'm guessing it's a smaller repo or something of the sort) and trying to load nvim-treesitter
, which causes this failure.
The conundrum is how to fix this. Options include:
requires
also affect installation order (somewhat complicated, for dubious payoff. The most "correct" solution, though)pcall
to suppress the error (hacky but maybe the best solution)I would prefer the second one, that is the functionality I would expect from requires
or maybe after
.
Thanks!
Related to existing proposed rework of require
semantics in #87.
Hello, the plugin
tree-sitter-refactor
fails every first install of packer.Screenshot
![image](https://user-images.githubusercontent.com/37723586/100273742-e3130480-2f22-11eb-99a9-733c7ebd88b3.png)But after the first install the plugin works and updates normally.
How to reproduce the bug
To reproduce the bug you should at least have the minimal configuration.
After that enter
nvim
and do a:PackerInstall
.Minimal configuration
Minimal
```lua vim.cmd [[ packadd packer.nvim ]] return require'packer'.startup(function() use { 'wbthomason/packer.nvim', opt = true } use { 'nvim-treesitter/nvim-treesitter' } use { 'nvim-treesitter/nvim-treesitter-refactor', -- Even without the requires it doesn't work requires = 'nvim-treesitter/nvim-treesitter' } use { 'romgrk/nvim-treesitter-context', -- Even without the requires it doesn't work requires = 'nvim-treesitter/nvim-treesitter' } end) ```packer
configurationFull configuration
Here is the full
packer
configuration, you can see the whole configuration in mynvim
repository here: https://github.com/datwaft/nvim/tree/0afbd5eaba9a01d0788eadbaceafd80e7dbdbb9cFull
```lua vim.cmd [[ packadd packer.nvim ]] vim.cmd [[ autocmd BufWritePost plugins.lua PackerCompile ]] return require'packer'.startup(function() use { 'wbthomason/packer.nvim', opt = true } use { 'svermeulen/vimpeccable' } use { 'bluz71/vim-nightfly-guicolors', config = require'plugins.colorscheme' } use { 'itchyny/lightline.vim', config = require'plugins.lightline' } use { 'markonm/traces.vim' } use { 'kyazdani42/nvim-web-devicons' } use { 'lambdalisue/glyph-palette.vim' } use { 'kshenoy/vim-signature' } use { 'mhinz/vim-signify' } use { 'unblevable/quick-scope', config = require'plugins.quickscope' } use { 'rrethy/vim-hexokinase', run = 'make hexokinase' } use { 'psliwka/vim-smoothie' } use { 'sheerun/vim-polyglot' } use { 'nvim-treesitter/nvim-treesitter', config = require'plugins.treesitter' } use { 'nvim-treesitter/nvim-treesitter-refactor', requires = 'nvim-treesitter/nvim-treesitter' } use { 'romgrk/nvim-treesitter-context', requires = 'nvim-treesitter/nvim-treesitter' } use { 'neoclide/coc.nvim', branch = 'release', config = require'plugins.coc', } use { 'wellle/targets.vim' } use { 'michaeljsmith/vim-indent-object' } use { 'bkad/camelcasemotion', config = require'plugins.camelcasemotion' } use { 'tpope/vim-commentary' } use { 'machakann/vim-sandwich' } use { 'machakann/vim-swap' } use { 'tommcdo/vim-exchange' } use { 'mbbill/undotree' } use { 'lambdalisue/gina.vim' } use { 'tpope/vim-abolish' } use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end } use { 'junegunn/fzf.vim' } use { 'christoomey/vim-tmux-navigator', config = require'plugins.tmuxnavigator' } use { 'jpalardy/vim-slime', config = require'plugins.slime' } end) ```packer
configurationmessages
command