andythigpen / nvim-coverage

Displays test coverage data in the sign column
MIT License
317 stars 37 forks source link

Colours aren't displaying correctly with Astronvim #37

Closed ewoolsey closed 10 months ago

ewoolsey commented 11 months ago

All highlight bars are grey, not red or green. I'm using the example setup and installing with lazy. Not really sure how to diagnose this, but happy to provide any info you request.

  {
    "andythigpen/nvim-coverage",
    lazy = false,
    requires = "nvim-lua/plenary.nvim",
    config = function()
      require("coverage").setup {
        commands = true, -- create commands
        highlights = {
          -- customize highlight groups created by the plugin
          covered = { fg = "#75e36b" }, -- supports style, fg, bg, sp (see :h highlight-gui)
          uncovered = { fg = "#F07178" },
        },
        signs = {
          -- use your own highlight groups or text markers
          covered = { hl = "CoverageCovered", text = "▎" },
          uncovered = { hl = "CoverageUncovered", text = "▎" },
        },
        summary = {
          -- customize the summary pop-up
          min_coverage = 80.0, -- minimum coverage threshold (used for highlighting)
        },
        lang = {
          -- customize language specific settings
        },
      }
    end,
  },
ewoolsey commented 11 months ago

Not sure If this is relevant, but I'm generating coverage for Rust using Tarpaulin to create the lcov. I have grcov installed for the plugin but didn't use it to actually generate anything.

folliehiyuki commented 11 months ago

Can you try https://github.com/andythigpen/nvim-coverage/pull/38 to see whether it fixes your issue?

Apparently nvim-coverage overwrites the highlight groups on setup, regardless of what they were set to before.

andythigpen commented 11 months ago

38 is merged now if you want to try it in the main branch

ewoolsey commented 11 months ago

38 is merged now if you want to try it in the main branch

Doesn't seem to have fixed the issue unfortunately. Anything else I can try?

andythigpen commented 10 months ago

I added an autocmd to create the default highlights when the colorscheme is loaded like in this comment: https://github.com/andythigpen/nvim-coverage/issues/11#issuecomment-1460523949

Can you try the latest main branch to see if that resolves your issue?

ewoolsey commented 10 months ago

I added an autocmd to create the default highlights when the colorscheme is loaded like in this comment: #11 (comment)

Can you try the latest main branch to see if that resolves your issue?

Success! Thanks so much :) Working as expected now, well done!