Skip to content

Changing color for identifiers #27

Closed Answered by tiagovla
bettydots asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

Maybe something like this should work:

return {
    "tiagovla/tokyodark.nvim",
    opts = {
        custom_highlights = function(hl, p)
            hl["Identifier"] = { fg = p.fg }
            return {}
        end,
    },
    config = function(_, opts)
        require("tokyodark").setup(opts)
        require("tokyodark").colorscheme()
    end,
}

The colors available are here and the highlight groups here. The hl inside the custom_highlights function exposes the full highlights table and p the colors.

Also, returning a table will merge it to the current highlights one. So this is also possible:

---
custom_highlights = function(hl, p)
    return {
        Identifier = { fg = p.fg },…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@tiagovla
Comment options

Answer selected by bettydots
@tiagovla
Comment options

@bettydots
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants