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

style being ignored #640

Closed
litoj opened this issue Jul 7, 2023 · 12 comments
Closed

style being ignored #640

litoj opened this issue Jul 7, 2023 · 12 comments

Comments

@litoj
Copy link

litoj commented Jul 7, 2023

I tried to customize the colors to match my NvimTree looks, but it seems that some options ignore their style setting.

try:

xplr.config.general.selection.item.style = {fg = "Magenta", add_modifiers = {"Underlined"}}
xplr.config.general.table.row.style = {fg = "Magenta"}
xplr.config.general.table.row.cols = {
	{format = "builtin.fmt_general_table_row_cols_1", style = {fg = "Magenta"}},
	{format = "builtin.fmt_general_table_row_cols_0", style = {fg = "Magenta"}},
}
xplr.config.general.table.header.cols = {{format = "", style = {fg = "Magenta"}}}
xplr.config.general.table.tree = {
	{format = "", style = {fg = "Magenta"}},
	{format = "", style = {fg = "Magenta"}},
	{format = "", style = {fg = "Magenta"}},
}
@sayanarijit
Copy link
Owner

For files, LS_COLORS and the style defined in xplr config.node_types will override ui style.

@litoj
Copy link
Author

litoj commented Jul 7, 2023

I haven't changed anything in the node_types section, though. The defaults look to me as nothing special is being set. Although I am not sure if that is what you meant, or if that was just file specific. Also, what does file refer to - filename being displayed?

@sayanarijit
Copy link
Owner

Right... If you can post a screenshot marking the regions with issue, would be great for debugging.

sayanarijit added a commit that referenced this issue Jul 7, 2023
- xplr.config.general.selection.item.style
- xplr.config.general.table.row.style
- xplr.config.general.table.row.cols[*].style
- xplr.config.general.table.header.cols[*].style

Ref: #640
@sayanarijit
Copy link
Owner

Pushed some fixes to d01b6f0, though, I'm not sure if this will fix everything. Since the priority for these styles are lower than per file specific style ($LS_COLORS and node_types).

@litoj
Copy link
Author

litoj commented Jul 7, 2023

It should be obvious when you apply the provided configuration - nothing is magenta although multiple things should be.

I added "Underline" to the selection to emphasize that it truly ignores the entire style table. Anyway, here is the picture:

image

@sayanarijit
Copy link
Owner

Try these changes with

LS_COLORS="" xplr -C styles.lua

@sayanarijit
Copy link
Owner

Pushed another fix: f440b56

@litoj
Copy link
Author

litoj commented Jul 7, 2023

Everything works with latest commit, except the table.tree styles. (I updated the config to include those a little later)

Also, this is probably intentional, but could the tree chars be rendered as a separate column? currently it disappears when fmt_general_table_row_cols_1 is not used (not a problem - everyone needs to know the filenames, but just an idea). That way filename column style wouldn't be applied to the tree marks.

@sayanarijit
Copy link
Owner

sayanarijit commented Jul 7, 2023

Good point. Let's see how to do it.

Actually, a separate column won't probably work, since it'd be too far in a wide screen.

@sayanarijit
Copy link
Owner

BTW, we're going to port the default Lua functions to the Rust side as built-in defaults for performance. So, let's wait for the new implementation.

@litoj
Copy link
Author

litoj commented Jul 7, 2023

Sounds great. Thanks for the quick responses.

@sayanarijit
Copy link
Owner

Closing this wrt #641

sayanarijit added a commit that referenced this issue Jul 14, 2023
- xplr.config.general.selection.item.style
- xplr.config.general.table.row.style
- xplr.config.general.table.row.cols[*].style
- xplr.config.general.table.header.cols[*].style

Ref: #640
sayanarijit added a commit that referenced this issue Jul 15, 2023
- xplr.config.general.selection.item.style
- xplr.config.general.table.row.style
- xplr.config.general.table.row.cols[*].style
- xplr.config.general.table.header.cols[*].style

Ref: #640
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