petertriho / nvim-scrollbar

Extensible Neovim Scrollbar
MIT License
870 stars 19 forks source link

[Question] How to configure colors? #100

Open rools32 opened 1 year ago

rools32 commented 1 year ago

I put the following configuration in my vimrc file:

require("scrollbar").setup({
    handle = {
        color = "#292e42",
    },
    marks = {
      Search = { color = "#ff9e64" },
      Error = { color = "#db4b4b" },
      Warn = { color = "#e0af68" },
      Info = { color = "#0db9d7" },
      Hint = { color = "#1abc9c" },
      Misc = { color = "#9d7cd8" },
      GitAdd = { text = "+", color="#ffffff" },
      GitChange = { text = "~", color="#ffffff" },
      GitDelete = { text = "-", color="#ffffff" },
  }
})
require('gitsigns').setup()
require("scrollbar.handlers.gitsigns").setup()

It works as expected if I also have colorscheme tokyonight-night. But, I do not know how to have the color setup working, without the colorscheme line.

Thank you.

vinoff commented 9 months ago

Did you find out how to do this? I am also interested in using RGB color codes.

EDIT: One way to do it is to set a variable, for example local red = "#fb4934", before the require line.