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

docs: Add clearer guide for statusline and tabuffline customization #212

Merged
merged 7 commits into from
Mar 30, 2024
Merged

docs: Add clearer guide for statusline and tabuffline customization #212

merged 7 commits into from
Mar 30, 2024

Conversation

LittleLegend-Pengiun
Copy link
Contributor

As a new comer, I found the guide for statusline customization is really frustrating. The guide on the main docs is not clear, the guide from other members in the community is really outdated. It took me days before I found out the right way.

In this PR, I separate the guide for statusline and tabuffline, also add example for each of them. This makes the guide clearer and easier to read and follow for new comers.

@siduck
Copy link
Member

siduck commented Mar 27, 2024

thats a lot of docs overload -_-

i dont think what can be confusing. the docs literally says statusline follows the same tabufliine syntax for overriding and you have to check the order in the src code files

@LittleLegend-Pengiun
Copy link
Contributor Author

thats a lot of docs overload -_-

i dont think what can be confusing. the docs literally says statusline follows the same tabufliine syntax for overriding and you have to check the order in the src code files

I think what's confusing here is the lack of example. So how about I reduce the amout of guide, but keep the 2 examples?

@siduck
Copy link
Member

siduck commented Mar 28, 2024

i dont think its confusing, the user just has to check the order on that src file

@LittleLegend-Pengiun
Copy link
Contributor Author

LittleLegend-Pengiun commented Mar 28, 2024

i dont think its confusing, the user just has to check the order on that src file

I mean, to some one work with Lua for a long time like you, it's not confusing at all. But isn't it better to at least, have an example for the new comers? I've reduced the amount of guide to be denser, so please have a look at that.

@siduck
Copy link
Member

siduck commented Mar 28, 2024

not quite, other new users could just override statusline just fine. you could just add a note to check the nvconfig.lua for default sets of options for statusline and then look at the stl/utils.lua for order.

I'm assuming you didnt read nvconfig file before, thats a must for any user as its the structure for chadrc, nvchad_ui docs are only for explanation of overriding those modules

@LittleLegend-Pengiun
Copy link
Contributor Author

not quite, other new users could just override statusline just fine. you could just add a note to check the nvconfig.lua for default sets of options for statusline and then look at the stl/utils.lua for order.

I'm assuming you didnt read nvconfig file before, thats a must for any user as its the structure for chadrc, nvchad_ui docs are only for explanation of overriding those modules

Thanks for your comment! I've read the nvconfig.lua, but I only scan through it to config the nvdash. I'll update the guide soon.

```lua
"%#BruhHl#" .. " bruh " -- the highlight group here is BruhHl
```
- For more customization, you should **read carefully** the default default sets of options in the [nvconfig.lua](https://github.com/NvChad/NvChad/blob/6833c60694a626615911e379d201dd723511546d/lua/nvconfig.lua#L21), then check the source code of their module order tables at [ui repo](https://github.com/NvChad/ui/blob/v2.5/lua/nvchad/stl/utils.lua).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should mention that you're talking about statusline here ( for the order ) @LittleLegend-Pengiun

@siduck siduck merged commit f2ab087 into NvChad:main Mar 30, 2024
1 check failed
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

Successfully merging this pull request may close these issues.

2 participants