p00f / clangd_extensions.nvim

Clangd's off-spec features for neovim's LSP client. Use https://sr.ht/~p00f/clangd_extensions.nvim instead
MIT License
448 stars 16 forks source link

`inline = true, only_current_line = false` not working #48

Closed horror-proton closed 10 months ago

horror-proton commented 10 months ago

When using config with

inlay_hints = {inline = true, only_current_line = false}

inlay hints would only show up on current line after calling set_inlay_hints.

Using


I think the problem might be here https://github.com/p00f/clangd_extensions.nvim/blob/323b00de2ee18cad1ac45eb95e680386c4ff4366/lua/clangd_extensions/inlay_hints.lua#L266

It works normally after adding

-        if line == current_line - 1 then
+        if line == current_line - 1 or not config.options.inlay_hints.only_current_line then
p00f commented 10 months ago

Nice catch, thanks