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

LspCodeLens support #10

Closed
guibou opened this issue Aug 18, 2021 · 2 comments · Fixed by #13
Closed

LspCodeLens support #10

guibou opened this issue Aug 18, 2021 · 2 comments · Fixed by #13
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@guibou
Copy link
Contributor

guibou commented Aug 18, 2021

LspCodeLens is the color of virtual text added by Lsp when code lens are used.

@EdenEast EdenEast added enhancement New feature or request good first issue Good for newcomers labels Aug 18, 2021
EdenEast added a commit that referenced this issue Aug 19, 2021
@guibou
Copy link
Contributor Author

guibou commented Aug 19, 2021

Thank you.

I'm trying to override this entry, however I was used to do hi link LspCodeLens Foo, but it does not work.

I also tried:

vim.g.nightfox_colors = {LspCodeLens = {fg = require('nightfox.colors').orange }}

But when I'm doing colorscheme nightfox, it complains that the LspCodeLens color does not exists.

@EdenEast
Copy link
Owner

The variable nightfox_colors is a way to override any defined color. So for example if you wanted to change the red of a theme you can do so (see issue 3 for an example)

Currently nightfox does not have a mechanism for overriding a highlight group. You can however override a highlight group yourself. Here is a code example of me overriding the String highlight group.

-- Setting the style you want the require colors to return
vim.g.nightfox_style = "nordfox"

-- Set the colorscheme
vim.cmd([[colorscheme nightfox]])

-- Get the colors from nightfox and util functions
local colors = require("nightfox.colors").setup()
local util = require("nightfox.util")

-- Pass highlight group you want to override with values
-- Values can be: bg, fg, style, and sp
util.highlight("String", { fg = colors.orange })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants