Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lsp signature fails for Solargraph #162

Closed
pBorak opened this issue Oct 29, 2022 · 7 comments · Fixed by #639
Closed

Lsp signature fails for Solargraph #162

pBorak opened this issue Oct 29, 2022 · 7 comments · Fixed by #639
Labels
bug Something isn't working

Comments

@pBorak
Copy link

pBorak commented Oct 29, 2022

Describe the bug
With LSP signature help enabled there's an error for some LSP, namely Solargraph. The issue is well-known issue and comes down to how Solargraph reports activeParamete. Some users have already reported it in another nvim plugin that gives this signature help functionality here and here.

To Reproduce
Steps to reproduce the behavior:

  1. Trigger LSP signature in Ruby file with Solargraph LSP.

Expected Behavior
Lsp signature pop-ups without highlighting active parameters.

Screenshots

Screenshot 2022-10-29 at 09 27 56

Noice Log
Please include any related errors from the Noice log file. (open with :Noice log)

Noice log

Sat Oct 29 09:27:53 2022
...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:118: attempt to index field 'parameters' (a nil value)

stack traceback:
[C]: in function 'pcall'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:140: in function '__index'
...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:118: in function 'active_parameter'
...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:155: in function 'format_signature'
...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:169: in function 'format'
...m/site/pack/packer/opt/noice.nvim/lua/noice/lsp/init.lua:193: in function <...m/site/pack/packer/opt/noice.nvim/lua/noice/lsp/init.lua:179>
[C]: in function 'xpcall'
.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:145: in function 'signature'
...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:91: in function 'handler'
...w/Cellar/neovim/0.8.0/share/nvim/runtime/lua/vim/lsp.lua:1390: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

@pBorak pBorak added the bug Something isn't working label Oct 29, 2022
@folke folke closed this as completed in 1dc7f26 Oct 29, 2022
@folke
Copy link
Owner

folke commented Oct 29, 2022

Fixed

@pBorak
Copy link
Author

pBorak commented Oct 29, 2022

@folke Sadly, after your fix, it still fails but in other place

Sat Oct 29 10:30:30 2022
...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:124: attempt to index local 'param' (a number value)

stack traceback:
	[C]: in function 'pcall'
	.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:140: in function '__index'
	...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:124: in function 'format_active_parameter'
	...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:157: in function 'format_signature'
	...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:169: in function 'format'
	...m/site/pack/packer/opt/noice.nvim/lua/noice/lsp/init.lua:193: in function <...m/site/pack/packer/opt/noice.nvim/lua/noice/lsp/init.lua:179>
	[C]: in function 'xpcall'
	.../site/pack/packer/opt/noice.nvim/lua/noice/util/call.lua:145: in function 'signature'
	...e/pack/packer/opt/noice.nvim/lua/noice/lsp/signature.lua:91: in function 'handler'
	...w/Cellar/neovim/0.8.0/share/nvim/runtime/lua/vim/lsp.lua:1390: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>

@folke
Copy link
Owner

folke commented Oct 29, 2022

My fix was wrong. Should be ok now

@pBorak
Copy link
Author

pBorak commented Oct 29, 2022

Yep, it works great now. Thanks!

edit:
@folke Sorry for mentioning you once again, but another issue is on the horizon.
Now it will show the empty popup for a method that does not exist.
Screenshot 2022-10-29 at 10 45 24

@folke
Copy link
Owner

folke commented Oct 29, 2022

Can you check if it's really empty?

Focus on the doc window and select all lines to see them non-concealed

@folke
Copy link
Owner

folke commented Oct 29, 2022

I just pushed a fix to not show empty messages. So if yours is effectively empty, it should not show now anymore

@pBorak
Copy link
Author

pBorak commented Oct 29, 2022

It seems it was really empty (I could not select anything there). Indeed your fix solved it. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants