MunifTanjim / nougat.nvim

🍫 Hyperextensible Statusline / Tabline / Winbar for Neovim 🚀
MIT License
197 stars 3 forks source link

quest: possibility to change colors for the modes and diagnostics? #71

Closed divramod closed 8 months ago

divramod commented 9 months ago

hey hey,

awesome plugin, thx for writing it!

is it possible to change the colors for the different modes like normal, visual, insert? i looked at the 3 examples and wasn't able to find it?

the same goes for the diagnostic_count? can i somewhere change these too, like i'll do it for the git counts?

thx again for the plugin!

towry commented 9 months ago

https://github.com/MunifTanjim/nougat.nvim/pull/6 isn't this what you want?

MunifTanjim commented 9 months ago

Yes absolutely.


For mode:

local color = require("nougat.color").get()

local mode = nut.mode.create({
  config = {
    highlight = {
      insert = { bg = color.blue, fg = color.bg },
      -- ...
    },
  },
})

Ref:


For diagnostic_count:

local diagnostic_count = nut.buf.diagnostic_count.create({
  hidden = nut.buf.diagnostic_count.hidden.if_zero(),
  hl = { bg = color.bg3 },
  prefix = " ",
  suffix = " ",
  config = {
    error = { prefix = " ", fg = color.red },
    warn = { prefix = " ", fg = color.yellow },
    info = { prefix = " ", fg = color.blue },
    hint = { prefix = "󰌶 ", fg = color.green },
  },
})

Ref:

MunifTanjim commented 9 months ago

Here's an example for git.status:

https://github.com/MunifTanjim/nougat.nvim/blob/6c7f5428226ed1f8e4f40595c3babacecb77d436/examples/bubbly.lua#L148-L176