You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using company-quickhelp and lsp with R, I experience two problems:
The documentation is not properly formatted: the box is too small. And if the actual content of company-show-doc-buffer (which is the same as *lsp-documentation*) is small, the box displayed by company-quickhelp has too few rows and columns and the contents cannot be read. I think this is a bug (but I don't know if it is from lsp, from company-quickhelp, from the R language server? company-box and company-posframe both work fine, so it seems due to company-quickhelp not formatting correctly what lsp sends it).
(This is not a bug, but something I'd like to modify): the documentation being displayed is some kind of abridged documentation ( *lsp-documentation*) and I'd like the full help (*lsp-help*, as given by lsp-describe-thing-at-point ).
How to reproduce
emacs -Q
M-x package-initialize
Create or load an R file.
M-x company-mode
M-x company-quickhelp-mode
M-x lsp
Now, in the R file type sometime like ape
If we go to the aperm entry we see this:
(where the box with the help is too tiny and almost nothing can be read).
If we do company-show-doc-buffer this is shown:
(I think this shows that company-quickhelp is trying to display *lsp-documentation*)
However, lsp-describe-thing-at-point shows the complete help
Note that what I experience in 7. is related to LSP. company-quickhelp works fine without LSP (e.g., I can M-x R, where LSP does not run ---lsp does not run in the iESS buffer---, and then M-x company-mode and on typing aper, on the company-quickhelp popup I see the full help without any formatting issues
).
Details
I think there are two issues:
A. The company-quickhelp box does not have the right size and this seems to be caused by something lsp is passing it. This happens regardless of the help, but is most noticeable in small helps, where the size problem prevents reading anything.
I do not know where the problem lies (lsp, company-quickhelp, language server) and I've tried changing the configuration of the R language server, to no avail[1]. (Anyway, I am using options(languageserver.rich_documentation = FALSE) to prevent related issues: REditorSupport/languageserver#670)
But this only happens to me when I use LSP, not in other modes (emacs lisp, for example) where company quickhelp works OK. This suggests to me that what is returned by LSP is confusing company.
Edit: company-box and company-posframe both work fine, so it seems due to company-quickhelp not formatting correctly what lsp sends it.
B. Even if A. was not an issue, I'd like company-help to show not the abridged help (what is currently reported by company-show-doc-buffer , i.e., *lsp-documentation*), but the long one shown by lsp-describe-thing-at-point. But I have no idea how to do that. I've tried advicing company-quickhelp--doc to show the output of lsp-describe-thing-at-point but without luck.
Output from lsp-doctor
Checking for Native JSON support: OK
Check emacs supports `read-process-output-max': OK
Check `read-process-output-max' default has been changed from 4k: OK
Byte compiled against Native JSON (recompile lsp-mode if failing when Native JSON available): OK
`gc-cons-threshold' increased?: ERROR
Using `plist' for deserialized objects? (refer to https://emacs-lsp.github.io/lsp-mode/page/performance/#use-plists-for-deserialization): OK
Using emacs 28+ with native compilation?: OK
(The output comes from emacs -Q and thus the gc-cons-threshold issue; for real, I increase that value to (setq gc-cons-threshold (* 3 1024 1024 1024)) but that is not the cause of the problem).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using
company-quickhelp
andlsp
with R, I experience two problems:The documentation is not properly formatted: the box is too small. And if the actual content of
company-show-doc-buffer
(which is the same as*lsp-documentation*
) is small, the box displayed bycompany-quickhelp
has too few rows and columns and the contents cannot be read. I think this is a bug (but I don't know if it is from lsp, from company-quickhelp, from the R language server? company-box and company-posframe both work fine, so it seems due to company-quickhelp not formatting correctly what lsp sends it).(This is not a bug, but something I'd like to modify): the documentation being displayed is some kind of abridged documentation (
*lsp-documentation*
) and I'd like the full help (*lsp-help*
, as given bylsp-describe-thing-at-point
).How to reproduce
emacs -Q
M-x package-initialize
Create or load an R file.
M-x company-mode
M-x company-quickhelp-mode
M-x lsp
Now, in the R file type sometime like
ape
If we go to the
aperm
entry we see this:(where the box with the help is too tiny and almost nothing can be read).
company-show-doc-buffer
this is shown:(I think this shows that company-quickhelp is trying to display
*lsp-documentation*
)lsp-describe-thing-at-point
shows the complete helpcompany-quickhelp
works fine without LSP (e.g., I canM-x R
, where LSP does not run ---lsp does not run in the iESS buffer---, and thenM-x company-mode
and on typingaper
, on the company-quickhelp popup I see the full help without any formatting issues).
Details
I think there are two issues:
A. The
company-quickhelp
box does not have the right size and this seems to be caused by something lsp is passing it. This happens regardless of the help, but is most noticeable in small helps, where the size problem prevents reading anything.I do not know where the problem lies (lsp, company-quickhelp, language server) and I've tried changing the configuration of the R language server, to no avail[1]. (Anyway, I am using
options(languageserver.rich_documentation = FALSE)
to prevent related issues: REditorSupport/languageserver#670)But this only happens to me when I use LSP, not in other modes (emacs lisp, for example) where company quickhelp works OK. This suggests to me that what is returned by LSP is confusing company.
Edit: company-box and company-posframe both work fine, so it seems due to company-quickhelp not formatting correctly what lsp sends it.
B. Even if A. was not an issue, I'd like company-help to show not the abridged help (what is currently reported by
company-show-doc-buffer
, i.e.,*lsp-documentation*
), but the long one shown bylsp-describe-thing-at-point
. But I have no idea how to do that. I've tried advicingcompany-quickhelp--doc
to show the output oflsp-describe-thing-at-point
but without luck.Output from lsp-doctor
(The output comes from
emacs -Q
and thus the gc-cons-threshold issue; for real, I increase that value to(setq gc-cons-threshold (* 3 1024 1024 1024))
but that is not the cause of the problem).Beta Was this translation helpful? Give feedback.
All reactions