zbirenbaum / neodim

Neovim plugin for dimming the highlights of unused functions, variables, parameters, and more
315 stars 10 forks source link

module 'nvim-treesitter.ts_utils' not found #20

Closed hacker-hackman closed 1 year ago

hacker-hackman commented 1 year ago

Does treesitter's recent update breaks Neodim? The error pops out when I create a new python file using $ nvim new_file.py.

packer.nvim: Error running config for neodim: ...are/nvim/site/pack/packer/opt/neodim/lua/neodim/util.lua:3: module 'nvim-treesitter.ts_utils' not found:
^Ino field package.preload['nvim-treesitter.ts_utils']
^Ino file './nvim-treesitter/ts_utils.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/nvim-treesitter/ts_utils.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-treesitter/ts_utils.lua'
^Ino file '/usr/local/share/lua/5.1/nvim-treesitter/ts_utils/init.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-treesitter/ts_utils.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/nvim-treesitter/ts_utils/init.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-treesitter/ts_utils.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-treesitter/ts_utils/init.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-treesitter/ts_utils.lua'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-treesitter/ts_utils/init.lua'
^Ino file './nvim-treesitter/ts_utils.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-treesitter/ts_utils.so'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-treesitter/ts_utils.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-treesitter/ts_utils.so'
^Ino file './nvim-treesitter.so'
^Ino file '/usr/local/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/nvim-treesitter.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
Press ENTER or type command to continue
^Ino file '/home/user/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-treesitter.so'
Press ENTER or type command to continue
zbirenbaum commented 1 year ago

Neodim uses the builtin functions for treesitter. I have all my plugins and treesitter parsers up to date without any issues so I think this is a different problem.

If you are currently loading treesitter any time other than on start, change it to something like module='nvim-treesitter' which will cause it to be loaded whenever the module is first called.

hacker-hackman commented 1 year ago

If you are currently loading treesitter any time other than on start

Yeah, I had event = 'BufRead' in my treesitter's config. Thanx!