nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.81k stars 461 forks source link

Bug: Not able to enable lualine with Lazy and using custom path for data dir to store installation files #1273

Closed vivekvpandya closed 3 weeks ago

vivekvpandya commented 4 weeks ago

Self Checks

How to reproduce the problem

Installed Lua line and enabled it in init.lua

Expected behaviour

lualine should work like any other plugin.

Actual behaviour

Error detected while processing /local/mnt/workspace/users/vpandya/nvim/init.lua: E5113: Error while calling lua chunk: /local/mnt/workspace/users/vpandya/nvim/init.lua:122: module 'lualine' not found: no field package.preload['lualine'] no file './lualine.lua' no file '/usr/share/luajit-2.1.0-beta3/lualine.lua' no file '/usr/local/share/lua/5.1/lualine.lua' no file '/usr/local/share/lua/5.1/lualine/init.lua' no file '/usr/share/lua/5.1/lualine.lua' no file '/usr/share/lua/5.1/lualine/init.lua' no file './lualine.so' no file '/usr/local/lib/lua/5.1/lualine.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lualine.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /local/mnt/workspace/users/vpandya/nvim/init.lua:122: in main chunk

shadmansaleh commented 3 weeks ago

Did you use the proper configuration on lazy?

https://github.com/nvim-lualine/lualine.nvim#lazynvim

It seems lualine is just not loaded rtp . It's not a lualine issue. likely miss configuration of lazy.

vivekvpandya commented 3 weeks ago

if you are referring to following rtp setting its there in my lazy config.

image

vivekvpandya commented 3 weeks ago

Screenshot 2024-07-08 102452 lualine is installed at this location.

shadmansaleh commented 3 weeks ago

if you are referring to following rtp setting its there in my lazy config.

image

Not that, Basically for any plugin to be loaded on neovim it's directory needs to be added to rtp. and few other things. Plugin managers handle these. Here you're loading the lazy onto neovim. Then lazy is supposed to load other plugins including lualine based on your configuration. If lualine isn't getting added to rtp that's plugin managers issue not lualines. Considering lazy is pretty stable, I feel like it might be a configuration issue instead.

vivekvpandya commented 3 weeks ago

I have other plugins installed and enabled they work just fine. Also, for plugins that works I don't see any specific config which specifies above directory path.

shadmansaleh commented 3 weeks ago

Can you give a minimal config that can reproduce it?

shadmansaleh commented 3 weeks ago

I have other plugins installed and enabled they work just fine. Also, for plugins that works I don't see any specific config which specifies above directory path.

what directory path are you talking about? like I said only plugin managers are concerned about maintaining rtp other plugins are not.