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

Error detected while processing function vimtex#nvim#check_treesitter #2389

Closed
sjacobsson opened this issue May 11, 2022 · 3 comments
Closed
Labels

Comments

@sjacobsson
Copy link

sjacobsson commented May 11, 2022

Description

When opening a .tex file in neovim, I get an error message saying that module 'vim.treesitter.highlighter', field package.preload['vim.treesitter.highlighter'], and a bunch of files are missing.

Sorry if this is not a vimtex problem!

Steps to reproduce

Putting this code in my init.vim reproduces the error message:

let g:plugged_home = '~/.vim/plugged'
call plug#begin(g:plugged_home)
        Plug 'lervag/vimtex'
call plug#end()

Expected behavior

No response

Actual behavior

When opening a .tex file, I get the following error message:

Error detected while processing function vimtex#nvim#check_treesitter:
line    9:
E5105: Error while calling lua chunk: [string "<VimL compiled string>"]:1: module 'vim.treesitter.highlighter' not found:
no field package.preload['vim.treesitter.highlighter']
no file '/home/simonj/.config/nvim/lua/vim/treesitter/highlighter.lua'
no file '/home/simonj/.config/nvim/lua/vim/treesitter/highlighter/init.lua'
no file '/home/simonj/.vim/plugged/vimtex/lua/vim/treesitter/highlighter.lua'
no file '/home/simonj/.vim/plugged/vimtex/lua/vim/treesitter/highlighter/init.lua'
no file '/etc/xdg/xdg-i3/nvim/lua/vim/treesitter/highlighter.lua'
no file '/etc/xdg/xdg-i3/nvim/lua/vim/treesitter/highlighter/init.lua'
no file '/etc/xdg/nvim/lua/vim/treesitter/highlighter.lua'
no file '/etc/xdg/nvim/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/lua/vim/treesitter/highlighter/init.lua'
no file '/home/simonj/.local/share/nvim/site/lua/vim/treesitter/highlighter.lua'
no file '/home/simonj/.local/share/nvim/site/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/i3/nvim/site/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/i3/nvim/site/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/local/share/nvim/site/lua/vim/treesitter/highlighter.lua'
no file '/usr/local/share/nvim/site/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/nvim/site/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/nvim/site/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/nvim/runtime/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/nvim/runtime/pack/dist/opt/matchit/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/nvim/runtime/pack/dist/opt/matchit/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/nvim/site/after/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/nvim/site/after/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/local/share/nvim/site/after/lua/vim/treesitter/highlighter.lua'
no file '/usr/local/share/nvim/site/after/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/i3/nvim/site/after/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/i3/nvim/site/after/lua/vim/treesitter/highlighter/init.lua'
no file '/home/simonj/.local/share/nvim/site/after/lua/vim/treesitter/highlighter.lua'
no file '/home/simonj/.local/share/nvim/site/after/lua/vim/treesitter/highlighter/init.lua'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/after/lua/vim/treesitter/highlighter.lua'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/after/lua/vim/treesitter/highlighter/init.lua'
no file '/etc/xdg/nvim/after/lua/vim/treesitter/highlighter.lua'
no file '/etc/xdg/nvim/after/lua/vim/treesitter/highlighter/init.lua'
no file '/etc/xdg/xdg-i3/nvim/after/lua/vim/treesitter/highlighter.lua'
no file '/etc/xdg/xdg-i3/nvim/after/lua/vim/treesitter/highlighter/init.lua'
no file '/home/simonj/.vim/plugged/vimtex/after/lua/vim/treesitter/highlighter.lua'
no file '/home/simonj/.vim/plugged/vimtex/after/lua/vim/treesitter/highlighter/init.lua'
no file '/home/simonj/.config/nvim/after/lua/vim/treesitter/highlighter.lua'
no file '/home/simonj/.config/nvim/after/lua/vim/treesitter/highlighter/init.lua'
no file './vim/treesitter/highlighter.lua'
no file '/usr/share/luajit-2.1.0-beta3/vim/treesitter/highlighter.lua'
no file '/usr/local/share/lua/5.1/vim/treesitter/highlighter.lua'
no file '/usr/local/share/lua/5.1/vim/treesitter/highlighter/init.lua'
no file '/usr/share/lua/5.1/vim/treesitter/highlighter.lua'
no file '/usr/share/lua/5.1/vim/treesitter/highlighter/init.lua'
no file '/home/simonj/.config/nvim/lua/vim/treesitter/highlighter.so'
no file '/home/simonj/.vim/plugged/vimtex/lua/vim/treesitter/highlighter.so'
no file '/etc/xdg/xdg-i3/nvim/lua/vim/treesitter/highlighter.so'
no file '/etc/xdg/nvim/lua/vim/treesitter/highlighter.so'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/lua/vim/treesitter/highlighter.so'
no file '/home/simonj/.local/share/nvim/site/lua/vim/treesitter/highlighter.so'
no file '/usr/share/i3/nvim/site/lua/vim/treesitter/highlighter.so'
no file '/usr/local/share/nvim/site/lua/vim/treesitter/highlighter.so'
no file '/usr/share/nvim/site/lua/vim/treesitter/highlighter.so'
no file '/usr/share/nvim/runtime/lua/vim/treesitter/highlighter.so'
no file '/usr/share/nvim/runtime/pack/dist/opt/matchit/lua/vim/treesitter/highlighter.so'
no file '/usr/share/nvim/site/after/lua/vim/treesitter/highlighter.so'
no file '/usr/local/share/nvim/site/after/lua/vim/treesitter/highlighter.so'
no file '/usr/share/i3/nvim/site/after/lua/vim/treesitter/highlighter.so'
no file '/home/simonj/.local/share/nvim/site/after/lua/vim/treesitter/highlighter.so'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/after/lua/vim/treesitter/highlighter.so'
no file '/etc/xdg/nvim/after/lua/vim/treesitter/highlighter.so'
no file '/etc/xdg/xdg-i3/nvim/after/lua/vim/treesitter/highlighter.so'
no file '/home/simonj/.vim/plugged/vimtex/after/lua/vim/treesitter/highlighter.so'
no file '/home/simonj/.config/nvim/after/lua/vim/treesitter/highlighter.so'
no file './vim/treesitter/highlighter.so'
no file '/usr/local/lib/lua/5.1/vim/treesitter/highlighter.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/vim/treesitter/highlighter.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/simonj/.config/nvim/lua/vim.so'
no file '/home/simonj/.vim/plugged/vimtex/lua/vim.so'
no file '/etc/xdg/xdg-i3/nvim/lua/vim.so'
no file '/etc/xdg/nvim/lua/vim.so'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/lua/vim.so'
no file '/home/simonj/.local/share/nvim/site/lua/vim.so'
no file '/usr/share/i3/nvim/site/lua/vim.so'
no file '/usr/local/share/nvim/site/lua/vim.so'
no file '/usr/share/nvim/site/lua/vim.so'
no file '/usr/share/nvim/runtime/lua/vim.so'
no file '/usr/share/nvim/runtime/pack/dist/opt/matchit/lua/vim.so'
no file '/usr/share/nvim/site/after/lua/vim.so'
no file '/usr/local/share/nvim/site/after/lua/vim.so'
no file '/usr/share/i3/nvim/site/after/lua/vim.so'
no file '/home/simonj/.local/share/nvim/site/after/lua/vim.so'
no file '/usr/share/kubuntu-default-settings/kf5-settings/nvim/after/lua/vim.so'
no file '/etc/xdg/nvim/after/lua/vim.so'
no file '/etc/xdg/xdg-i3/nvim/after/lua/vim.so'
no file '/home/simonj/.vim/plugged/vimtex/after/lua/vim.so'
no file '/home/simonj/.config/nvim/after/lua/vim.so'
no file './vim.so'
no file '/usr/local/lib/lua/5.1/vim.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/vim.so'
no file '/usr/local/lib/lua/5.1/loadall.so'

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: Ubuntu 20.04.4 LTS
  Vim version: NVIM v0.4.3
  Has clientserver: true
  Servername: /tmp/nvimPKMlks/0

VimTeX project: main
  base: main.tex
  root: /home/simonj/Documents/dagbok_2022
  tex: /home/simonj/Documents/dagbok_2022/main.tex
  main parser: recursive search
  document class: report
  packages: aligned-overset amsbsy amsfonts amsgen amsmath amsopn amssymb amstext amsthm array atbegshi atveryend auxhook babel bigintcalc bitset braket calc cancel caption caption3 cleveref color csquotes datet
  source files:
    main.tex
    preamble/preamble.tex
    preamble/my_commands.tex
    include/v8.tex
    include/v10.tex
    include/v11.tex
    include/v12.tex
    include/v13.tex
    include/v14.tex
    include/v15.tex
    include/v17.tex
    include/v19.tex
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: General
  qf method: LaTeX logfile
@sjacobsson sjacobsson added the bug label May 11, 2022
@nullchilly
Copy link

You are using neovim 0.4.3 while the latest version is 0.7

I guess this check only works for neovim 0.5+

@sjacobsson
Copy link
Author

Thank you for pointing this out! That is probably the problem then. Sorry for opening an issue.

@lervag
Copy link
Owner

lervag commented May 12, 2022

I would say it makes sense to update. However, I also currently write in the docs that neovim 0.4.3 is supported, so I don't think it is good that it should error out like this. I'll look into if I can fix it.

lervag added a commit that referenced this issue May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants