tamton-aquib / staline.nvim

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

Problem in window #21

Closed bryant-the-coder closed 2 years ago

bryant-the-coder commented 2 years ago

This plugin is great. But it create a visual error or somekind... It says a directory of mine, multiple lines which is kinda annoying tho

tamton-aquib commented 2 years ago

Heyyo @bryant-the-coder , sorry for the inconvenience.

Could you share the screenshot of the error and your current staline settings?

bryant-the-coder commented 2 years ago

I will get back to you as my house just got hit by flash flood in Malaysia. Cleaning at the very moment. I will get back to you about 3-4 days or maybe more? Is that ok?

tamton-aquib commented 2 years ago

yep fine for me 😅 , take care in the meantime.

bryant-the-coder commented 2 years ago

Your plugin is nice as i cant seem to implement the icon in different modes in other plugins. Your plugins suits it :)) or maybe we, you and i try to implement some stuff? I am still new to this coding stuff. I just approach it about 4 month ago

bryant-the-coder commented 2 years ago

I will use lualine for a few more months as it is stable

bryant-the-coder commented 2 years ago

Or i will try at least try to use your plugins idea in my lualine conf... My repo https://github.com/bryant-the-coder/NvHack

bryant-the-coder commented 2 years ago
 ​--​> Closing Windows and buffers 
 ​Util.​close_command​ ​=​ ​function​() 
 ​        ​local​ total ​=​ ​0 
 ​        ​for​ _, buf ​in​ ​ipairs​(vim.​api​.​nvim_list_bufs​()) ​do 
 ​                ​if​ vim.​api​.​nvim_buf_is_loaded​(buf) ​and​ vim.​api​.​nvim_buf_is_valid​(buf) ​then 
 ​                        total ​=​ total ​+​ ​1 
 ​                ​end 
 ​        ​end 

 ​        vim.​cmd​(total ​==​ ​1​ ​and​ ​"​:q​"​ ​or​ ​"​:bd​"​) 
 ​end

What does this does??

tamton-aquib commented 2 years ago

Your plugin is nice as i cant seem to implement the icon in different modes in other plugins.

I have seen some people using lualine with that, so its probably definitely possible 😅

What does this does??

To keep a single keybind for :q and :bd. that is, if there is only buffer, it uses :q else :bd. Where :q is for quitting the window and :bd is for deleting the buffer(:bdelete)

bryant-the-coder commented 2 years ago

Your plugin is nice as i cant seem to implement the icon in different modes in other plugins.

I have seen some people using lualine with that, so its probably definitely possible 😅

What does this does??

To keep a single keybind for :q and :bd. that is, if there is only buffer, it uses :q else :bd. Where :q is for quitting the window and :bd is for deleting the buffer(:bdelete)

For lualine how can i do that? Not only colors but with icons changing. And for the :q i will steal that idea lmao can you explain some of your config to me? In discord which i will add now

bryant-the-coder commented 2 years ago

I cant find your discord. This is mine bryant-the-coder#7947