Question: how to make airline-like statusline?
linrongbin16 opened this issue · 4 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
Does the `colors` in a component also cover the text in `separator` and `padding` option?separator
andpadding
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:
- remove
padding
,separator
options, users can create their paddings and separators with a component, your plugin just need to render. - Pay attention to the component and its child components, the tree-like data structure is very important.
- Try provide caching, so users can make calculating async, so it will have better performance.
- 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.
Hi, can your write by english. I know we all have lunar new year, but i'm from vietnam, your neigbour.