Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to custom inlayhints bg color and fg color #350

Open
IWANABETHATGUY opened this issue May 12, 2023 · 5 comments
Open

Question: How to custom inlayhints bg color and fg color #350

IWANABETHATGUY opened this issue May 12, 2023 · 5 comments

Comments

@IWANABETHATGUY
Copy link

No description provided.

@IWANABETHATGUY
Copy link
Author

According to this pull request, https://github.com/EdenEast/nightfox.nvim/pull/205/files#diff-47d639f17cdad63995941eae4c5fe0a07b271cc889c9973a6357aa276f9dae07R19, inlay hints fg is always same as comments ,
image
It is pretty hard to read if I want a green comments color

@EdenEast
Copy link
Owner

You can override the highlight group LspInlayHint.

require("nightfox").setup({
  groups = {
    all = {
      LspInlayHint = { fg = "fg3" },
    },
  },
})

You can find more info on the palette and spec

@IWANABETHATGUY
Copy link
Author

Seems not working

-- Default options
require('nightfox').setup({
  options = {
    -- Compiled file's destination location
    compile_path = vim.fn.stdpath("cache") .. "/nightfox",
    compile_file_suffix = "_compiled", -- Compiled file suffix
    transparent = false,               -- Disable setting background
    terminal_colors = true,            -- Set terminal colors (vim.g.terminal_color_*) used in `:terminal`
    dim_inactive = false,              -- Non focused panes set to alternative background
    module_default = true,             -- Default enable value for modules
    colorblind = {
      enable = false,                  -- Enable colorblind support
      simulate_only = false,           -- Only show simulated colorblind colors and not diff shifted
      severity = {
        protan = 0,                    -- Severity [0,1] for protan (red)
        deutan = 0,                    -- Severity [0,1] for deutan (green)
        tritan = 0,                    -- Severity [0,1] for tritan (blue)
      },
    },
    styles = {
      comments = "NONE", -- Value is any valid attr-list value `:help attr-list`
      conditionals = "NONE",
      constants = "NONE",
      functions = "NONE",
      keywords = "NONE",
      numbers = "NONE",
      operators = "NONE",
      strings = "NONE",
      types = "NONE",
      variables = "NONE",
    },
    inverse = {
      -- Inverse highlight for different types
      match_paren = false,
      visual = false,
      search = false,
    },
    modules = {
      -- List of various plugins and additional options
      fidget = true,
    },
  },
  palettes = {
    nordfox = {
      -- -- comment is the definition of the comment color.
      comment = "#83b260",
    },

  },
  specs = {},
  groups = {
    nordfox = {
      LspInlayHint = { fg = "red" },
    }
  },
})

-- setup must be called before loading
vim.cmd [[colorscheme nordfox]]

This is my config,
image
This is the screenshot after apply this config, you could see inlay is still same as comments.

@EdenEast
Copy link
Owner

The override for group is incorrect. It should be:

LspInlayHint = { fg = "palette.red" },

Refer to readme for more information.

@IWANABETHATGUY
Copy link
Author

Still nothing change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants