-
-
Notifications
You must be signed in to change notification settings - Fork 898
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
signature help with lv is nor word wrapping too long documentation lines (seen with java doc) #1216
Comments
But it still leaves the question how automatically enable visual line mode to break long lines into words... Seems it's in fundamental mode, so I don't want to just add it to this mode's hook... |
What do you mean by visual line mode? You want |
Actually what ever happens when you use select "Word Wrap (Visual Line Mode)" from the "Options->Line Wrapping in this Buffer" Menu. I assume it is the same as M-x visual-line-mode: Not just wrap a line at whatever character is at the end of the line length (and having those ugly continuation arrows). Visual line mode makes sure to wrap at word boundaries (and also takes care of cursor movement to not see only one, continued line - not important for our case here). |
@abo-abo we are using lv package for displaying signature help What do you think about having visual-line-mode enabled by default in lv window as suggested by @jtl5770 ? I could patch it on lsp-mode side(or eventually duplicate the lv implementation?) but IMO it will be useful for other packages using lv too. WDYT? |
|
@jtl5770 can you provide the log for this call? I think I have seen similar issues in the past and back then it was caused by markdown-mode. |
sorry to ask something most probably obvious: How do I provide a log? |
@jtl5770 |
hope this helps.... |
@yyoncho - maybe you can save the hassle... I realized I had openjdk-1.8 installed. I switched to some more reasonable openjdk-11 and the formatting of the javadocs looks like your example. Maybe there is no need to support archaic versions here... |
Re emacs-lsp/lsp-mode#1216 Example: (add-hook 'lv-window-hook 'visual-line-mode)
@yyoncho I've just added |
@yyoncho: well, updated everything from MELPA - but it simply doesn't work. I added to the hook as described, no effect... |
@yyoncho - I tried again in the hope I made something wrong the first time.. but no: visual-line-hook is added to lv-window-hook, but no effect. I tried with melpa up to date as of today, with Java. E.g. using completion on a method showed the signature help for the arguments with lines not wrapped, and by that mostly useless to really read the documentation. Regards, jtl |
The signature help using lv is pretty neat, unfortunately it doesn't work too well with java doc as the content often has long lines which are not word wrapped, but truncated which is hard to follow. And if I turn on word wrapping in that buffer, the nice ascii graphics with the "header line" and the vertical line on the left is being broken.
To Reproduce
Use it on a signature with java-doc whose contents is longer than fits a line.
Expected behavior
I would expect lines either being broken and wrapped unconditionally, or and option to do so and by doing that, the arrangement and display of the help should not be broken
Which Language Server did you use
eclipse for java
OS
Linux
The text was updated successfully, but these errors were encountered: