Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to source nvim-treesitter.lua #29453

Closed
handrew opened this issue Jun 22, 2024 · 6 comments
Closed

Failed to source nvim-treesitter.lua #29453

handrew opened this issue Jun 22, 2024 · 6 comments
Labels
closed:invalid Issues that are closed as "invalid"

Comments

@handrew
Copy link

handrew commented Jun 22, 2024

Problem

I recently upgraded neovim using brew upgrade neovim and now whenever I nvim into any file, I get the below.

Failed to source `/Users/myusername/.local/share/nvim/lazy/nvim-treesitter/plugin/n
vim-treesitter.lua`

vim/_editor.lua:0: BufReadPost Autocommands for "*"..script nvim_exec2() called
at BufReadPost Autocommands for "*":0../Users/myusername/.local/share/nvim/lazy/nvi
m-treesitter/plugin/nvim-treesitter.lua: Vim(source):E5113: Error while calling
lua chunk: ...m/0.10.0/share/nvim/runtime/lua/vim/treesitter/query.lua:651: Over
riding existing predicate has-ancestor?
stack traceback:
^I[C]: in function 'error'
^I...m/0.10.0/share/nvim/runtime/lua/vim/treesitter/query.lua:651: in function '
add_predicate'
^I...nvim-treesitter/lua/nvim-treesitter/query_predicates.lua:94: in main chunk
^I[C]: in function 'require'
^I.../share/nvim/lazy/nvim-treesitter/lua/nvim-treesitter.lua:8: in main chunk
^I[C]: in function 'require'
^I...are/nvim/lazy/nvim-treesitter/plugin/nvim-treesitter.lua:9: in main chunk
^I[C]: in function 'nvim_exec2'
^Ivim/_editor.lua: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:486: in function <
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:485>
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:113: in function '
try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:485: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:443: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:411: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:346: in function '_load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:191: in function 'load'
^I...cal/share/nvim/lazy/lazy.nvim/lua/lazy/view/commands.lua:55: in function 'load'
^I/Users/myusername/.config/nvim/lua/core/utils.lua:111: in function </Users/myusername/.config/nvim/lua/core/utils.lua:93>

# stacktrace:
  - vim/_editor.lua:0 _in_ **cmd**
  - ~/.config/nvim/lua/core/utils.lua:111

Then, pressing any key, I get:

Failed (1)
 extensions       clone failed
Cloning into '/Users/myusername/.local/share/nvim/lazy/extensions'...
remote: Repository not found.
fatal: repository 'https://github.com/NvChad/extensions.git/' not found

Which looks to be the case because the repo no longer exists.

Steps to reproduce

nviming into any file produces this

Expected behavior

Normally it would just open the file without any problems, but I get the above error messages before I can access the file.

Neovim version (nvim -v)

v0.10.0

Vim (not Nvim) behaves the same?

vim works fine

Operating system/version

14.5

Terminal name/version

iTerm

$TERM environment variable

xterm-256color

Installation

brew install neovim

@handrew handrew added the bug issues reporting wrong behavior label Jun 22, 2024
@clason
Copy link
Member

clason commented Jun 22, 2024

Make sure all your plugins are fully updated; also clean the luac cache to make sure.

@clason clason closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2024
@clason clason added closed:invalid Issues that are closed as "invalid" and removed bug issues reporting wrong behavior treesitter labels Jun 22, 2024
@handrew
Copy link
Author

handrew commented Jun 22, 2024

@clason I'm not sure how to do either of those things.

Running the command here https://vi.stackexchange.com/questions/43972/lazy-nvim-upgrade-plugins-from-command-line
gets me the same errors

And there is no cache as mentioned here folke/lazy.nvim#29

@clason
Copy link
Member

clason commented Jun 22, 2024

Delete `vim.fn.stdpath('cache')..'/luac'. For the lazy.nvim questions, please use that plugin's support channels.

@handrew
Copy link
Author

handrew commented Jun 22, 2024

Sorry to be dense, but I don't think that is the problem... Clearing the cache didn't work, and the problem isn't that the extensions aren't up to date, it's that it's trying to clone a repo that doesn't seem to exist anymore.

@clason
Copy link
Member

clason commented Jun 22, 2024

Well, that's an issue with your config, isn't it? Try starting with a clean installation and adding things you know work one by one. This will tell you exactly where the problem comes from (or, more often, solve it).

@handrew
Copy link
Author

handrew commented Jun 22, 2024

Ah—I have been enlightened. Had to go through these steps

  1. https://vi.stackexchange.com/questions/41474/lazyvim-removal-uninstall-guidance
  2. Realizing that neovim and lazyvim were not the same thing and reinstalling lazyvim.

No more problems. Thanks for putting up with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:invalid Issues that are closed as "invalid"
Projects
None yet
Development

No branches or pull requests

2 participants