GNU bug report logs - #67609
29.1; (eglot-inlay-hints-mode -1) behaves surprisingly, does not work in cc-mode hooks

Previous Next

Package: emacs;

Reported by: Morgon Kanter <morgon.kanter <at> gmail.com>

Date: Sun, 3 Dec 2023 18:35:02 UTC

Severity: normal

Found in version 29.1

Full log


Message #11 received at 67609 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Morgon Kanter <morgon.kanter <at> gmail.com>
Cc: 67609 <at> debbugs.gnu.org
Subject: Re: bug#67609: 29.1; (eglot-inlay-hints-mode -1) behaves
 surprisingly, does not work in cc-mode hooks
Date: Sun, 3 Dec 2023 19:23:19 +0000
On Sun, Dec 3, 2023 at 7:02 PM Morgon Kanter <morgon.kanter <at> gmail.com> wrote:

> (defun config:cc-defaults ()
>   ;(setq c-require-final-newline t)  ;; lol causes errors in cc-mode
>   (c-toggle-comment-style 1)
>   (subword-mode 1)
>   (diminish 'subword-mode)
>   (local-set-key (kbd "C-M-S-<backspace>") #'kill-outer-sexp-and-parens)
>   (eglot-inlay-hints-mode -1))
>
> ...and I will receive the same behavior. The eglot-ensure here is a red herring.

I never said this would work either.  It's not a red herring
in the sense that you shouldn't expect eglot-ensure to have
loaded eglot in the buffer after the form has finished.

And you shouldn't expect (eglot-inlay-hints-mode -1) to have
any effect before Eglot is loaded, which obviously does not
happen in the absence of any Eglot-related command as you show here.

So, this doesn't add anything to the story.

> To reproduce, visit a C++ buffer in a project, run M-x eglot. Inlay
> hints will appear. Kill and reopen the buffer. Inlay hints will
> appear.

To achieve your desired behaviour, read my advice in the last email,
thanks.

João




This bug report was last modified 1 year and 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.