sontungexpt / sttusline

A very lightweight, super fast and lazyloading statusline plugin for Neovim written in lua.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: how to make airline-like statusline?

linrongbin16 opened this issue · comments

Hi,

I found it's very difficult to render the left slant, right slant icons to make an airline-like statusline.

Would you please share some knowledge on that?

My config is here: https://github.com/linrongbin16/lin.nvim/pull/464/files#diff-0d8b193648b49d94453058fdc06f50c994b6a80b16a223188af9e0852ea02c6aR269-R270

update:

I found the reason that crash the border between two components, is the separator and padding option:

image

Does the colors in a component also cover the text in separator and padding option?

commented

update:

I found the reason that crash the border between two components, is the separator and padding option:

image Does the `colors` in a component also cover the text in `separator` and `padding` option?

Apologies for the delay in response; I'm currently immersed in the Lunar New Year festivities. I've implemented color schemes for the separators, but I'm contemplating whether to include highlights for the padding. What are your thoughts?

hi @sontungexpt , I'm in Shanghai China, so Happy new year!

For user like me, I think the proper design is: let colors take effect on whole component, including padding options. If user want a padding, they can create a new component for that.

Your plugin is actually very close to heirline.nvim, also I guess padding and separator option is from lualine.nvim.

You could take a look at heirline, I feel like it's the best statusline plugin that support fully customizations.

I'm now using heirline, please see my config:https://github.com/linrongbin16/lin.nvim/pull/470/files#diff-e80bc0191eeb8f27cd694d6618e4c9b8e52ca91108ae3ec0374eeec7f3798d64

Personal advise:

  1. remove padding, separator options, users can create their paddings and separators with a component, your plugin just need to render.
  2. Pay attention to the component and its child components, the tree-like data structure is very important.
  3. Try provide caching, so users can make calculating async, so it will have better performance.
  4. Try provider auto-theme based on current colorscheme. It's a very hard part for user. It needs to retrieve RGB colors from highlight groups, and adjust these colors to brighter or darker, to give user a color that makes user feel better.

At last, you can merge table_version branch into main branch, don't worry about break changes, just always use the best design and solution for your project.

commented

Hi, can your write by english. I know we all have lunar new year, but i'm from vietnam, your neigbour.