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

[Bug] LunarNvim integration issues #12

Closed pidgeon777 closed 3 years ago

pidgeon777 commented 3 years ago

Hi, first of all, congratulations on this great plugin.

I'm encountering some difficulties integrating it in the LunarVim config package.

lua\plugins.lua:

return require("packer").startup(function(use)
    ....
    use {'ray-x/navigator.lua', requires = {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}, opt = true}
    ....
    require_plugin("navigator.lua")
    ....
end)

lua\init.lua:

....
require('my-navigator-lua')
....

lua\my-navigator-lua\init.lua:

require'navigator'.setup()

The fact is that it seems to install correctly (no errors reported), but it reports an error when starting Neovim:

Errore/i eseguendo C:\Work\MEGA\Portable\Neovim\config\init.vim:
riga  511:
E5108: Error executing lua ...er\opt\navigator.lua\lua\navigator\lspclient\clients.lua:49: table index is nil

Help with running it in LunarVim would be greatly appreciated!

pidgeon777 commented 3 years ago

Also referenced here:

https://github.com/ChristianChiarulli/LunarVim/issues/482

ray-x commented 3 years ago

It seems navigator failed to handle pathname in windows. (I am not using windows ATM) Could you help me check the following output in your neovim cmd

: lua print(vim.fn.expand("$HOME"))

My output is /User/rayx

And this: : lua print(vim.fn.expand("$HOME") .. "/.config/nvim")

My output is /User/rayx/.config/nvim

And this: lua print(vim.fn.isdirectory(vim.fn.expand("$HOME") .. "/.config/nvim"))

My output is 1

Also this : lua print(vim.fn.stdpath('config'))

I doubt that windows may output sth total different

Also add some code may help prevent error throw. Please update the plugin as well.

pidgeon777 commented 3 years ago

Thanks for the prompt reply:

lua print(vim.fn.expand("$HOME")):

C:\Users\Myusername

My output is /User/rayx

lua print(vim.fn.expand("$HOME") .. "/.config/nvim"):

C:\Users\Myusername/.config/nvim

My output is /User/rayx/.config/nvim

lua print(vim.fn.isdirectory(vim.fn.expand("$HOME") .. "/.config/nvim"))

0

My output is 1

lua print(vim.fn.stdpath('config'))

C:\Users\Myusername\AppData\Local\nvim

Also add some code may help prevent error throw. Please update the plugin as well.

I didn't understand what actions I should take for doing as you suggested.

ray-x commented 3 years ago

run:

: PackerUpdate

That will allow you update all plugins

pidgeon777 commented 3 years ago

Now it seems to have properly loaded. Great work.

I'll test it right now.

ray-x commented 3 years ago

Hi, @pidgeon777 Can you confirm the issue been solved in the latest version?

pidgeon777 commented 3 years ago

Thank you @ray-x , this issue has been solved, I had a chance to do more testing and I found some other issues which I just reported.