tamton-aquib / staline.nvim

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

New Features + Bug Fixes #19

Closed is0n closed 2 years ago

is0n commented 2 years ago

Update the README:

Address the changes made in this PR.

Bug with Floating Windows:

When using special filetypes with certain floating windows, staline would render itself for the buffer/file behind the floating window instead of the actual floating window. This commit fixes that and slightly decreases the LOC needed to do this.

Section Updates:

  1. The lsp_name section would only show the first client used in a neovim session and wouldn't update after a new client was used.
  2. Add cwd section that uses vim.fn.fnamemodify(vim.fn.getcwd(), ':t') to get the cwd.

Modified Icon Option:

Now the user can modify the icon shown to the right of the file_name section with the mod_symbol option.

New Filetypes:

Add filetypes for:

  1. jaq-nvim
  2. fm-nvim

and since staline should render correctly when using a floating window, plugins like nvim-toggleterm.lua and FTerm.nvim that use a floating window should be supported.

tamton-aquib commented 2 years ago

Heyyo @is0n , thanks for these epic changes (again) 😅

While testing, i noticed: image

Should we concat(", ") and then add t.lsp_client_symbol in the beginning? 🤔

Was also thinking of using tbl_extend() on Tables.special_table so users can add custom or extra filetypes.

Lemme know what you think 😅

is0n commented 2 years ago

Should we concat(", ") and then add t.lsp_client_symbol in the beginning?

I believe the latest commit should have fixed this.

Was also thinking of using tbl_extend() on Tables.special_table so users can add custom or extra filetypes.

Isn't adding your own filetypes already possible? Just add special_table inside of the setup function and follow the same format as the source code.

require('staline').setup {
  -- your config and what not

  special_table = {
    FTerm = { "FTerm", "ï’‰  "},
  }

  -- more config
}

I just add filetypes so that users don't have to do it themselves.

tamton-aquib commented 2 years ago

Isn't adding your own filetypes already possible? Just add special_table inside of the setup function and follow the same format as the source code.

Ah i was thinking it would override the default ones all along haha, my bad.

Thanks again. merging...