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

Common tree highlight groups #158

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

bini-x
Copy link

@bini-x bini-x commented Sep 26, 2024

Closes #157.

@AlexvZyl AlexvZyl changed the base branch from main to dev September 26, 2024 13:23
@AlexvZyl
Copy link
Owner

Can you please rather make the changes from the dev branch?

@AlexvZyl
Copy link
Owner

@5-pebbles I forgot this was going to happen with our dev setup. I assume it's fine having people submit PRs from the dev branch.

@AlexvZyl
Copy link
Owner

@bini-x Wait, leave this PR as is for now.

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

Okay

@AlexvZyl AlexvZyl deleted the branch AlexvZyl:main September 26, 2024 13:32
@AlexvZyl AlexvZyl closed this Sep 26, 2024
@AlexvZyl AlexvZyl reopened this Sep 26, 2024
@AlexvZyl
Copy link
Owner

@5-pebbles Okay I am going to have to rethink that lol.

@bini-x I see your editor formatted the entire file, please undo that.

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

Ok

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

Can you check it now @AlexvZyl

@AlexvZyl
Copy link
Owner

Run this in the root of nordic:

stylua --config-path=.stylua.toml .

You might have to install stylua first.

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

I just saw what my formatter did. sorry. i fixed it all now

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

@AlexvZyl

@AlexvZyl
Copy link
Owner

Great, now can you share a preview of the new changes?

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

yes
image
you can see the color of root name is now dark blue (blue0 of color palette), git untracked is now red_b and in the next image you can see the dialog that opens when you add/rename/delete a file/directory is orange_b:
image

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

@AlexvZyl any comments?

@AlexvZyl
Copy link
Owner

Will reply, gonna go mountain biking

@bini-x
Copy link
Author

bini-x commented Sep 26, 2024

image
just changed some colors i thought were bad earlier

@AlexvZyl
Copy link
Owner

Definitely like iteration two more :)

@AlexvZyl
Copy link
Owner

Check the tests. Somewhere you misspelled fg.

@5-pebbles These tests are lovely

@AlexvZyl
Copy link
Owner

Ah no, you used orange directly. Orange is a table.

@bini-x
Copy link
Author

bini-x commented Sep 27, 2024

Oh okay. What's the name of the first orange in palette?

@bini-x
Copy link
Author

bini-x commented Sep 27, 2024

I'll try to find and I'll fix it

@AlexvZyl
Copy link
Owner

@bini-x
Copy link
Author

bini-x commented Sep 28, 2024

@AlexvZyl you can check it now, because I wasn't sure if these were groups or not

@AlexvZyl
Copy link
Owner

That looks good. Will test it locally later.

@AlexvZyl AlexvZyl marked this pull request as ready for review September 28, 2024 10:36
@AlexvZyl AlexvZyl added the Enhancement New feature, request or suggestion label Sep 28, 2024
@AlexvZyl
Copy link
Owner

I actually don't use those tree plugins anymore. Would you mind sharing screenshots?

@bini-x
Copy link
Author

bini-x commented Sep 29, 2024

yes, I can but just for NeoTree because I don't use nvimTree

@bini-x
Copy link
Author

bini-x commented Sep 29, 2024

image
you can see the dialog prompt has the bg white now, git untracked is orange and rootname is white.

Copy link
Collaborator

@5-pebbles 5-pebbles left a comment

Choose a reason for hiding this comment

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

I like the merger of tree plugins a lot!

lua/nordic/groups/integrations.lua Outdated Show resolved Hide resolved
lua/nordic/groups/integrations.lua Outdated Show resolved Hide resolved
lua/nordic/groups/integrations.lua Outdated Show resolved Hide resolved
5-pebbles
5-pebbles previously approved these changes Sep 29, 2024
Copy link
Collaborator

@5-pebbles 5-pebbles left a comment

Choose a reason for hiding this comment

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

Everything looks good to me : )

@bini-x
Copy link
Author

bini-x commented Oct 2, 2024

@AlexvZyl have you seen the final result yet?

@AlexvZyl
Copy link
Owner

AlexvZyl commented Oct 2, 2024

@AlexvZyl have you seen the final result yet?

I don't miss a thing :) I promise I will properly check when I get the chance.

@bini-x
Copy link
Author

bini-x commented Oct 2, 2024

@5-pebbles what do you think about making the root directory's name bold?
image

@bini-x
Copy link
Author

bini-x commented Oct 2, 2024

because in cases like this, if it isn't bold it looks the same as a file's name:
image

@5-pebbles
Copy link
Collaborator

@5-pebbles what do you think about making the root directory's name bold? image

I actually really like that. Go for it!

5-pebbles
5-pebbles previously approved these changes Oct 3, 2024
Copy link
Collaborator

@5-pebbles 5-pebbles left a comment

Choose a reason for hiding this comment

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

That looks great!

@geofflane
Copy link

👍🏼 To this. Just noticed the same issue.

Comment on lines 103 to 104
G.TreeRootFolder = { fg = C.gray4 }
G.TreeRootName = { fg = C.fg, bold = true }
Copy link
Owner

Choose a reason for hiding this comment

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

I think these two are the same thing?

G.TreeFileIcon = { fg = C.blue2 }
G.TreeFileNameOpened = { fg = C.fg }
G.TreeSpecialFile = { fg = C.magenta.bright }
G.TreeGitConflict = { fg = C.magenta.bright }
Copy link
Owner

Choose a reason for hiding this comment

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

Conflict rather red?

Comment on lines +109 to +115
G.TreeGitModified = { fg = C.git.change }
G.TreeGitDirty = { fg = C.gray4 }
G.TreeGitAdded = { fg = C.git.add }
G.TreeGitNew = { fg = C.gray4 }
G.TreeGitDeleted = { fg = C.gray4 }
G.TreeGitStaged = { fg = C.gray4 }
G.TreeGitUntracked = { fg = C.orange.base }
Copy link
Owner

Choose a reason for hiding this comment

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

IMO these "identifiers" should either:

  1. All be subtle and grey (I prefer this)
  2. Or have their respective colors.

@5-pebbles Opinion?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would personally prefer colors as the default.

My repos are usually an unstaged mess, and the colors help prevent the spread of chaos, but that's more of a "me problem".

I think either way works; the people who don't like whatever we pick will just change it in their own configs. Though, it would be worth adding the unchosen variation to the list of common configurations that I plan on writing someday.

TLDR: I don't know which is better...

Copy link
Author

Choose a reason for hiding this comment

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

which gray do you think should they be?

Copy link
Owner

Choose a reason for hiding this comment

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

I think most people expect colors. So go with that.

G.TreeGitDeleted = { fg = C.gray4 }
G.TreeGitStaged = { fg = C.gray4 }
G.TreeGitUntracked = { fg = C.orange.base }
G.TreeTitleBar = { fg = C.black0, bg = C.blue2, bold = true }
Copy link
Owner

Choose a reason for hiding this comment

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

I think this should maybe link to Winbar?

Copy link
Author

Choose a reason for hiding this comment

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

is it just link = "Winbar", because I can't find anything with the name "Winbar" in this file

Copy link
Collaborator

Choose a reason for hiding this comment

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

is it just link = "Winbar", because I can't find anything with the name "Winbar" in this file

Yup, that should work:

G.WinBar = { bg = C.bg_dark, fg = C.gray5 }

For future reference if you click the search bar on GitHub via this pr it will search the current repos contents. You can do the same locally with something like ripgrep or telescopes built in ripgrep picker.

G.TreeGitStaged = { fg = C.gray4 }
G.TreeGitUntracked = { fg = C.orange.base }
G.TreeTitleBar = { fg = C.black0, bg = C.blue2, bold = true }
G.TreeFloatBorder = { fg = C.blue2, bg = C.gray0}
Copy link
Owner

Choose a reason for hiding this comment

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

This should use our float colors.

Copy link
Author

Choose a reason for hiding this comment

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

can you tell me the float colors?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can find the extended palette values and their definitions here:

-- Floating windows
C.bg_float = (options.transparent.float and C.none) or ((options.swap_backgrounds and C.gray0) or C.black1)
C.fg_float = C.fg
C.bg_float_border = C.bg_float
C.fg_float_border = C.border_fg

G.TreeIndentMarker = { fg = C.gray4 }
G.TreeSymlink = { fg = C.blue2 }
G.TreeFolderName = { fg = C.blue1 }
G.TreeWinSeparator = { fg = C.bg_dark, bg = C.bg }
Copy link
Owner

Choose a reason for hiding this comment

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

This should link to the existing win sep.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for your reply, Alex!
Couldn't reply earlier because I had some other things to do.
I'll see what I can do and I'll try to finish it as soon as I can.

Copy link
Author

Choose a reason for hiding this comment

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

i can't find the existing window separator

Copy link
Collaborator

Choose a reason for hiding this comment

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

just use: link = "WinSeparator"
see definition:

G.WinSeparator = { fg = C.border_fg, bg = C.border_bg } -- the column separating vertically split windows

Copy link
Owner

Choose a reason for hiding this comment

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

Sorry, should just have told you what the hl is 😂

Copy link
Author

Choose a reason for hiding this comment

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

Np, I'm thinking now how could I not find the window separator, it was there the whole time...😅

@bini-x
Copy link
Author

bini-x commented Oct 21, 2024

@AlexvZyl added the requested changes, hopefully I didn't forget anything

@bini-x
Copy link
Author

bini-x commented Oct 21, 2024

i'm not so sure about line 116 tho

@AlexvZyl
Copy link
Owner

Sorry for disappearing, again... been a rough year.

Will check the changes again when I am back at my PC (around 2 Jan).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature, request or suggestion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NeoTree showing poor contrast
4 participants