tamton-aquib / staline.nvim

A modern lightweight statusline and bufferline plugin for neovim in lua.
MIT License
380 stars 17 forks source link

Not working with init.vim #40

Closed Stefanomarton closed 2 years ago

Stefanomarton commented 2 years ago

Hi there, first of all very nice work, i really like the look of the bar. I'm trying to setup it with init.vim as I'm not lua master. I've set all the requirements in my config

set termguicolors
set laststatus=3
set showtabline=2

I've inserted the default config in an external .lua file

luafile ~/.config/nvim/lua/staline.lua

nvim load with no errors but the bar does not appear. Can you spot anything wrong? I'm having no problem doing the same with nvimtree Thanks for your time ~Ste

tamton-aquib commented 2 years ago

Heyyo @Stefanomarton, sorry for the late reply 😅

What version of nvim are you on? how does your config structure look like? Are you calling luafile path inside init.vim?

Also, could you try setting this line inside init.vim (after installing the plugin without the luafile path)

lua require("staline").setup()
Stefanomarton commented 2 years ago

So I have version 0.7.2 This is my file structure image I tried using lua require("staline").setup() But i get this image

tamton-aquib commented 2 years ago

That looks like a name collision.

Set this line in init.vim:

lua require("staline").setup()

remove all other things related to staline (including the lua/staline.lua file which causes the collision)

So in short, the only two lines you have related to staline will be

Plug 'tamton-aquib/staline.nvim'

and

lua require("staline").setup()
Stefanomarton commented 2 years ago

Ok now works I can't get why I can't include in an external file :/ I have to insert my bar config in init.vim?

tamton-aquib commented 2 years ago

name the file other than staline.lua to avoid name collisions and we're good to go 😅

Also you can

lua require("staline-config")

instead of

luafile ~/.config/nvim/lua/staline-config.lua

where staline-config.lua is the new filename (~/.config/nvim/lua/staline-config.lua)

Stefanomarton commented 2 years ago

THANKS A LOT