hardhackerlabs / themes

🧑🏾‍🚀 One Theme to Rule Them All 🌈
https://hardhacker.com
Apache License 2.0
681 stars 15 forks source link

Inlay hint is unreadable #19

Closed WindSoilder closed 4 months ago

WindSoilder commented 11 months ago

Hi, I'm here again, after trying inlay hint feature from nightly neovim, I found that the hint text is unreadable

asciicast

It'd be good if the color is readble to user

anson0370 commented 11 months ago

Oops, mistake operation.

Thank you very much for your feedback. Please @skoowoo help confirm this issue.

skoowoo commented 11 months ago

I don't see what's unreadable about it ??? Explain that to me, please, thanks.

WindSoilder commented 11 months ago

Sure! Take OneDark theme as example, when I enable inlay hint, it shows the type of x variable clearly: 图片 But in hardhacker theme, it doesn't show anything because of color I believe: 图片

&str here is something called virtual text, which is returned by language server, in case if you're interested, here is relative pr in neovim: https://github.com/neovim/neovim/pull/23984

skoowoo commented 11 months ago

Oh, I got it. Thank u, I will fix it.

WindSoilder commented 11 months ago

BTW, I've managed to set a comment color for inlay hint text.

local on_attach = function(client, bufnr)
  if client.server_capabilities.inlayHintProvider then
    vim.api.nvim_set_hl(0, "LspInlayHint", { fg = "#938aad" })
    nmap('<leader>ih', function() vim.lsp.inlay_hint(0, nil) end, "Toggle [I]nlay [H]int")
  end
end

Here is how it looks like: image

I copy relative setting from a youtube channel and another plugin. Sorry for that I'm not good at lua and vim plugin system, not really sure where should I put relative code. Just hope it can help.

skoowoo commented 11 months ago

BTW, I've managed to set a comment color for inlay hint text.

local on_attach = function(client, bufnr)
  if client.server_capabilities.inlayHintProvider then
    vim.api.nvim_set_hl(0, "LspInlayHint", { fg = "#938aad" })
    nmap('<leader>ih', function() vim.lsp.inlay_hint(0, nil) end, "Toggle [I]nlay [H]int")
  end
end

Here is how it looks like: image

I copy relative setting from a youtube channel and another plugin. Sorry for that I'm not good at lua and vim plugin system, not really sure where should I put relative code. Just hope it can help.

Great, Thanks for you.

I learn your solution first and then integrate it .