ray-x / navigator.lua

Code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐 Exploring LSP and 🌲Treesitter symbols a piece of 🍰 Take control like a boss 🦍
MIT License
1.31k stars 58 forks source link

Attempt to perform arithmetic on local 'width' (a nil value) java language server (jdtls) #257

Closed JuanEL0 closed 1 year ago

JuanEL0 commented 1 year ago

I opened a Java project (SpringBoot) but when I try to open the treesitter document symbol, I got this error:

E5108: Error executing lua: .../packer/start/navigator.lua/lua/navigator/treesitter.lua:779: attempt to perform arit
hmetic on local 'width' (a nil value)
stack traceback:
        .../packer/start/navigator.lua/lua/navigator/treesitter.lua:779: in function <.../packer/start/navigator.lua
/lua/navigator/treesitter.lua:768>

And of course I can not open the floating window but with other projects (Typescript, Angular and Go) I don`t have this problem. Thanks.

ray-x commented 1 year ago

It may not releated to jdtls. It may be more related to the treesitter parser for java. Did you installed java TS parser?

I also pushed a fix to show a warning if no TS symbols are found.

JuanEL0 commented 1 year ago

You are right, I didn't install the java TSParser, sorry I am very new in NVIM.

Once I have installed, everything works as butter in bread.

By the way this project is amazing, thank you!!