From: Dmitry Gutov <dmitry@gutov.dev>
To: "João Távora" <joaotavora@gmail.com>
Cc: 62816@debbugs.gnu.org
Subject: bug#62816: 30.0.50; ElDoc blinks echo area when eldoc-documentation-compose is used
Date: Fri, 14 Apr 2023 02:37:39 +0300 [thread overview]
Message-ID: <2e04fa32-d52e-73ac-dabb-7ed5396dce0a@gutov.dev> (raw)
In-Reply-To: <87ttxj2wpm.fsf@gmail.com>
On 14/04/2023 02:23, João Távora wrote:
> Dmitry Gutov <dmitry@gutov.dev> writes:
>
>> I still see the problem with window jumping and blinking when typing
>> with company-mode enabled, though. You say: "I do use company and
>> multi-line echo areas liberally". Do you have some extra configuration
>> for company-frontends?
>
> Not that I know of. I just use a TTY frame. I don't see it. The echo
> area is frequently empty for me when selecting Eglot completions (in
> clangd, the server I most use nowadays).
>
>> Here's a screencast that demonstrates the problem:
>> https://a.uguu.se/csTMrzxc.webm
>
> Ugh, that indeed looks awful. We must fix it.
>
>> One way to fix that is
>> (push 'company-echo-metadata-frontend company-frontends)
Sorry, that was supposed to be (delete ...). The one above restores the
configuration -- I needed it for a repeat comparison.
>> but I wonder whether some better solution exists.
>
> I hope so.
>
>> OTOH, Eglot implements the attribute which this frontend plugs into
>> via :company-docsig, and it seems like both with LSP servers that I
>> just tried it returns nil. If the feature is generally unused, I could
>> understand if Eglot users all disable this frontend anyway.
>
> I don't think that's the best solution. Though you're right that only
> one server, pyright, uses this (it's some user's hack in eglot.el I let
> through: I don't even know what it does, i think it tells)
Maybe other servers have different bits of info that could be used for this?
> But, perhaps to ask the obvious, why can't Company just detect when nil
> is passed to it via :company-docsig and not do any echoing in that
> situation? Isn't it Company doing the clearing we want to avoid?
I think it does need to clear the echo area when it was previously
echoed to by the same backend (showing meta from a different
completion). E.g. after the user just presses C-n with completion popup
already visible. So the idea to "just not do any echoes" would require
some bookkeeping about where the current message came from, compare the
current message contents, and possibly still fail sometimes where the
exact same message came from a different source. The last one is
unlikely, though.
> Another option is just to temporarily disable eldoc during the duration
> of the Company completion session.
Right.
And yet another solution would be to detect that Eldoc will be used, and
try to plug into its documentation functions to display the meta thingy
alongside the other info.
That's at least 3 potential solutions now.
> I think Company could/should do both of these things, but I haven't
> studied the problem so I might be missing something.
I've looked into that issue in the past, but haven't picked one yet.
Related:
https://github.com/company-mode/company-mode/issues/797
https://github.com/company-mode/company-mode/issues/588
https://github.com/company-mode/company-mode/issues/796
next prev parent reply other threads:[~2023-04-13 23:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 14:47 bug#62816: 30.0.50; ElDoc blinks echo area when eldoc-documentation-compose is used João Távora
2023-04-13 22:58 ` Dmitry Gutov
2023-04-13 23:23 ` João Távora
2023-04-13 23:37 ` Dmitry Gutov [this message]
2023-04-14 0:16 ` João Távora
2023-04-14 0:22 ` Dmitry Gutov
2023-04-15 1:03 ` Dmitry Gutov
2023-04-14 18:03 ` Dmitry Gutov
2023-04-14 18:09 ` João Távora
2023-04-14 18:53 ` Eli Zaretskii
2023-04-14 19:58 ` João Távora
2023-04-15 9:13 ` Eli Zaretskii
2023-04-15 11:04 ` João Távora
2023-04-15 11:40 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e04fa32-d52e-73ac-dabb-7ed5396dce0a@gutov.dev \
--to=dmitry@gutov.dev \
--cc=62816@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).