uloco/bluloco.nvim

Regarding the color issue of inlay_hint

jinzhongjia opened this issue · 16 comments

Its background color is the same as the annotation, so it doesn't look clear enough. Maybe we can make the difference by deepening the background color of inlay_hint.

image

uloco commented

I see. How about reversing colors? So bg and fg switch?

this theme https://github.com/projekt0n/github-nvim-theme do like this:
image

I don’t know much about neovim’s color. It seems like the bg is accentuated.

in https://github.com/Mofiqul/vscode.nvim, like this:
image
Annotations and inlayhint colors are completely different

this theme https://github.com/projekt0n/github-nvim-theme do like this: image

I don’t know much about neovim’s color. It seems like the bg is accentuated.

I think we can directly refer to its processing method, and the workload should be minimal.

uloco commented

this theme https://github.com/projekt0n/github-nvim-theme do like this: image

I don’t know much about neovim’s color. It seems like the bg is accentuated.

I think we can directly refer to its processing method, and the workload should be minimal.

This one looks good

I was planning to add this at some point... did you solve it other way or why did you close?

This issue hasn't changed for a long time. I thought you didn't plan to add this feature.
Now I’m looking forward to the new features in the future

Just a lot on my plate. But I want to close all issues at some point ;)

this theme https://github.com/projekt0n/github-nvim-theme do like this: image

I don’t know much about neovim’s color. It seems like the bg is accentuated.


This theme uses the LspInlayHint highlight group to implement it, here's the code:
https://github.com/projekt0n/github-nvim-theme/blob/067cb69b93957ace0d0d83811453b401d1fb672c/lua/github-theme/group/modules/native_lsp.lua#L19

All we need now is a suitable background colour for both the dark theme and the light theme and it should be done.

I want to test this but couldn't figure out how to enable the inlay hints....

I looked around and found that inlay hints are a Neovim nightly feature.
nvimdev/lspsaga.nvim#1204

He uses his own plugin called LspUI in his configuration, and I'm not sure if his plugin uses Neovim nightly or Neovim stable, but installing his plugin might allow you to test it:
https://github.com/jinzhongjia/LspUI.nvim

@jinzhongjia would you mind providing a minimal config to display the inlay hints as well as some code examples to test it?

first, add this to lua_ls config(I use nevim-lspconfig), this will request lua_ls enable inlay_hint feature

    settings = {
        Lua = {
            hint = {
                enable = true,
                arrayIndex = "Enable",
                setType = true,
            },
            workspace = {
                checkThirdParty = false,
            },
        },
    },

Then install neovim nightly, and you can use this to enable inlay_hint easily:
:lua vim.lsp.inlay_hint.enable(0, true)
It will enable inlay_hint for current buffer(current buffer be represented by 0 )

use this to disable inaly_hint :lua vim.lsp.inlay_hint.enable(0, false)

The inlay_hint of my plugin is just a package for the official function, which is more convenient for management (such as opening and closing different types of files and temporarily closing them)

image

just like this

I think these are enough for testing without the need to install additional plugins

I want to test this but couldn't figure out how to enable the inlay hints....

@uloco Neovim stable has updated to 0.10.0 and inlay hints should be easily testable now.