Skip to content

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