ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.06k stars 58 forks source link

[phpactor]: Highlight wrong keyword on matching string #55

Closed shaksiper closed 2 years ago

shaksiper commented 3 years ago

If the same keyword came before the current parameter's name such as string $foo, string $string first matching keyword is highlighted (string before $foo in above example)

crop 1 crop 2

... string $string, ... is never highlighted

ray-x commented 3 years ago

what PHP lsp you are using?

shaksiper commented 3 years ago

Sorry I wasn't very detailed.

I'm using Nvim 0.5 with ALE and Compe And phpactor as the PHP language server lsp_signature with default configs.

shaksiper commented 3 years ago

PHP variable starting character "$" might be the reason. Because it breaks the signature window too. Basically as soon as I put $, the windows just disappears. As the screenshots show, $ char is not even highlighted. So matching pattern probably just ignores it.

ray-x commented 3 years ago

My codes should have cover '$'. But I need to test it.

ray-x commented 3 years ago

I tried but phpactor failed to work. I got a 255 error.

I also tested intelephense, it works correctly with $

Please enable the logs by:

  require "lsp_signature".setup({
            log_path = "/your_log_path/sig.log",
            debug = true,
  })

And attach the logs sig.log please.

shaksiper commented 3 years ago

I'll try to in the first opportunity.

dirn commented 3 years ago

Update August 11, 2021: This doesn't appear to be an issue anymore.


I'm not sure if this is related, but using Neovim's builtin client and the Jedi language server, I've noticed a similar problem with Python. When the name of the argument appears elsewhere earlier in the signature, the highlight is in the wrong place.

image image image

Whereas if the argument's name doesn't appear anywhere else before it, it works as expected.

image