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

For long hover text, content is cut and not useful #117

Closed
lynlevenick opened this issue Sep 20, 2018 · 4 comments
Closed

For long hover text, content is cut and not useful #117

lynlevenick opened this issue Sep 20, 2018 · 4 comments

Comments

@lynlevenick
Copy link

lynlevenick commented Sep 20, 2018

I'm using solargraph 0.28.1 and eglot at the commit hash f482c3ecf766a9230ea46a5f54b2bd7821c11233.

I wrote a file, test.rb with the content:

StandardError

Moving the point over StandardError results in the following display:

image

Solargraph appears to return the full documentation:

$ ri StandardError
= StandardError < Exception

(from ruby core)
------------------------------------------------------------------------------
The most standard error types are subclasses of StandardError. A rescue clause
without an explicit Exception class will rescue all StandardErrors (and only
those).

  def foo
    raise "Oups"
  end
  foo rescue "Hello"   #=> "Hello"

On the other hand:

  require 'does/not/exist' rescue "Hi"

raises the exception:

  LoadError: no such file to load -- does/not/exist
------------------------------------------------------------------------------
(END)

I'm not sure that there's a great solution to making this particular instance work well, but it seems like there could be better handling of this case to indicate that the full content is not being displayed, and perhaps to favor the beginning of it rather than the end.

@fbergroth
Copy link
Contributor

#111 attempts to deal with this: hovering only shows the first line, and to view the full documentation you can use M-x eglot-help-at-point.

@joaotavora
Copy link
Owner

I'm aware of the problem, but unfortunately don't have time to analyze fully. I don't remember the bc reason for pruning the last part the string anymore, and this is why I'm weary of merging #111

@muffinmad
Copy link
Collaborator

@lynlevenick Looks like this issue is fixed in recent eglot version. Thanks for the patience! ;-)

@joaotavora
Copy link
Owner

Yep this seems to be fixed by #459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants