maxmx03 / dracula.nvim

Dracula.nvim is a port of the popular Dracula colorscheme for Neovim,
MIT License
83 stars 6 forks source link

I can't overwrite default color for comments. #30

Closed BlitzkriegDrew closed 3 months ago

BlitzkriegDrew commented 5 months ago

Hey there, I struggle to change default color for comments, while Normal I can change to whatever color. Have no idea what I'm doing wrong, on the other hand I can change base01 color and it works. Guys, please explain.

return {
    {
        "maxmx03/dracula.nvim",
        lazy = false,
        priority = 1000,
        config = function()
            ---@type dracula
            local dracula = require("dracula")

            dracula.setup({
                transparent = true,
                on_colors = function(colors, color)
                    ---@type dracula.palette
                    return {
                        -- override or create new colors
                        mycolor = "#ffffff",
                    }
                end,
                on_highlights = function(colors, color)
                    ---@type dracula.highlights
                    return {
                        ---@type vim.api.keyset.highlight
                        comment = { fg = colors.mycolor },
                        -- Comment = { fg = colors.mycolor },
                        Normal = { fg = colors.mycolor },
                    }
                end,
                plugins = {
                    ["nvim-treesitter"] = true,
                    ["nvim-lspconfig"] = true,
                    ["nvim-navic"] = true,
                    ["nvim-cmp"] = true,
                    ["indent-blankline.nvim"] = true,
                    ["neo-tree.nvim"] = true,
                    ["nvim-tree.lua"] = true,
                    ["which-key.nvim"] = true,
                    ["dashboard-nvim"] = true,
                    ["gitsigns.nvim"] = true,
                    ["neogit"] = true,
                    ["todo-comments.nvim"] = true,
                    ["lazy.nvim"] = true,
                    ["telescope.nvim"] = true,
                    ["noice.nvim"] = true,
                    ["hop.nvim"] = true,
                    ["mini.statusline"] = true,
                    ["mini.tabline"] = true,
                    ["mini.starter"] = true,
                    ["mini.cursorword"] = true,
                },
            })
            vim.cmd.colorscheme("dracula")
            -- vim.cmd.colorscheme("dracula-soft")
        end,
    },
maxmx03 commented 5 months ago

The easier way is to change the color, i guess it's base01 used on comments.