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: allow individual hl custamization of scrollbar for docs and menu #2078

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

Conversation

jonathan-elize
Copy link

@jonathan-elize jonathan-elize commented Nov 2, 2024

This allows you to set the highlight group of the scrollbar in the completion menu and doc menu to be something you'd want to be specifically. This solves this issue here: #1775

This is just an example of the change here (I chose wild colors just to make them stand out):
Screenshot 2024-11-02 at 2 05 07 PM

The way you would do this by using scrollbar_winhighlight and scrollbar_thumb_winhighlight and setting them to highlights you'd want to use:

  cmp.setup({
    window = {
      documentation = {
        scrollbar_winhighlight = "EndOfBuffer:DocCmpSbar,NormalFloat:DocCmpSbar",
        scrollbar_thumb_winhighlight = "EndOfBuffer:DocCmpThumb,NormalFloat:DocCmpThumb",
      },
      completion = {
        scrollbar_winhighlight = "EndOfBuffer:DocCmpSbar,NormalFloat:DocCmpSbar",
        scrollbar_thumb_winhighlight = "EndOfBuffer:DocCmpThumb,NormalFloat:DocCmpThumb",
      },
    },
  })

  vim.cmd('highlight CmpSbar guibg=red')
  vim.cmd('highlight CmpThumb guibg=green')

  vim.cmd('highlight DocCmpSbar guibg=blue')
  vim.cmd('highlight DocCmpThumb guibg=orange')

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.

1 participant