Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to make airline-like statusline? #17

Open
linrongbin16 opened this issue Feb 5, 2024 · 4 comments
Open

Question: how to make airline-like statusline? #17

linrongbin16 opened this issue Feb 5, 2024 · 4 comments

Comments

@linrongbin16
Copy link

linrongbin16 commented Feb 5, 2024

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

@linrongbin16
Copy link
Author

linrongbin16 commented Feb 7, 2024

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?

@sontungexpt
Copy link
Owner

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?

@sontungexpt sontungexpt reopened this Feb 9, 2024
@linrongbin16
Copy link
Author

linrongbin16 commented Feb 9, 2024

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.

@sontungexpt
Copy link
Owner

sontungexpt commented Feb 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants