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

Feat: Customise offset highlight #155

Open
AlexvZyl opened this issue Aug 22, 2023 · 7 comments
Open

Feat: Customise offset highlight #155

AlexvZyl opened this issue Aug 22, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@AlexvZyl
Copy link

It would be really cool if I was able to change the highlight of the offset text seperatley from the fill, so that it can fit in with the look I have going with the open buffers.

Does that seem like something you would support?

Screenshot 2023-08-22 at 09 21 24

P.S. This is by far my favorite bufferline plugin.

@willothy
Copy link
Owner

willothy commented Aug 25, 2023

Sorry for the late reply! Definitely would like to support this, that's a good idea.

@willothy
Copy link
Owner

willothy commented Sep 8, 2023

Actually, this should already be supported, the highlight shouldn't reset until the next section. Mind sharing your config?

@AlexvZyl
Copy link
Author

AlexvZyl commented Sep 8, 2023

I have this for the offset.

-- Set used colors
-- ...

require('cokeline').setup {
    default_hl = {
        fg = function(buffer) return buffer.is_focused and fg or inactive_fg end,
        bg = function(buffer) return buffer.is_focused and bg or inactive_bg end,
    },
    sidebar = {
        filetype = 'NvimTree',
        components = {
            {
                text = ' 󰙅  File Explorer ',
                fg = title,
                bg = dark_bg,
                style = 'bold',
            },
        },
    }
}

@AlexvZyl
Copy link
Author

AlexvZyl commented Sep 8, 2023

If I change the line bg = dark_bg to use my buffer background it sets the entire offset.

@willothy
Copy link
Owner

willothy commented Sep 8, 2023

Oh, I see, I misunderstood what you were asking for. I'll add that in today!

The highlight not resetting was intentional for continuity but I can make that optional.

@willothy
Copy link
Owner

My bad, forgot about this. I'll try to get this in sometime this week.

@AlexvZyl
Copy link
Author

How dare you forget to do work for free.

@willothy willothy added this to the 1.0.0 Release milestone Oct 3, 2023
@willothy willothy added the enhancement New feature or request label Oct 3, 2023
@willothy willothy self-assigned this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants