Issafalcon / lsp-overloads.nvim

Extends the native nvim-lsp handlers to allow easier navigation through method overloads.
MIT License
88 stars 4 forks source link

Not getting active parameter highlight #37

Closed tsakirist closed 3 months ago

tsakirist commented 3 months ago

Hello, thanks for the plugin.

I just tried it and I can't seem to get active parameter highlight. LspSignatureActiveParameter is set in my colorscheme but it doesn't seem to be applied.

Also, does the signature get automatically updated to highlight the next parameter, when a parameter is typed? Or do we have to use the keymaps for that? (Asking since I couldn't discern that since there is no highlighting)

Any ideas?

Neovim

NVIM v0.10.0-dev-2737+g00b7428b3 Build type: Release LuaJIT 2.1.1710088188

fahadbr commented 3 months ago

i'm also not getting the parameter highlight

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1710088188

fahadbr commented 3 months ago

this workaround helped me. you can use your highlight group of choice of course. add this anytime after the colorscheme is loaded -

      local labelhl = vim.api.nvim_get_hl_by_name('Function', true)
      vim.api.nvim_set_hl(0,
        "LspSignatureActiveParameter",
        { fg = labelhl.foreground, italic = true, bold = true })
Issafalcon commented 3 months ago

@tsakirist - A PR was recently raised and merged that makes it easier to set the highlight parameter for LspSignatureActiveParameter when using this plugin.

That said, I'm not sure why it wasn't working for you before. You should be able to just set the highlight as @fahadbr mentioned, without any issue. I don't know how your colourscheme does it, but it could be setting it incorrectly, causing the highlighting to be "unset".

altnp commented 2 months ago

I am running into the same issue

image

Confirmed the highlight is set:

image

fneu commented 1 month ago

I also got this issue.

The LspSignatureActiveParameter highlight group is set, but apparently not being used. instead :Inspect shows @markup.raw.block.markdown.

This is on nvim 0.10.0 with the default colorscheme.

Issafalcon commented 2 weeks ago

45 - This now fixes the issue that the above likely points to. The label of the signature help was being incorrectly identified for highlighting, despite correctly setting the highlight group.