emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eglot "inlay hints" landed


From: Dimitri Belopopsky
Subject: Re: Eglot "inlay hints" landed
Date: Thu, 23 Feb 2023 11:55:06 +0100

Inlay hints are working well on my end!
The only issue I seem to be having is when the server doesn't support inlay hints, and I have " (add-hook 'eglot-managed-mode-hook #'eglot-inlay-hints-mode)" in my config.

It keeps erroring in this case and the connection to the lsp server seems to terminate in some cases. In any case it causes interference with other things, like completion which can stop working.

You can try it with pylsp, and add "(add-hook 'eglot-managed-mode-hook #'eglot-inlay-hints-mode)" to your config. Trying to write a simple main function will show issues.

For example this python code:

def main():
    pass



On Thu, 23 Feb 2023 at 11:04, João Távora <joaotavora@gmail.com> wrote:
On Thu, Feb 23, 2023 at 9:56 AM Chinmay Dalal
<dalal.chinmay.0101@gmail.com> wrote:

> > Why would we want that?
>
>
> >> > When
> >> > scrolling a window, it may take a short amount of time for inlay hints
> >> > to "pop in".

> It will solve this problem:

Not significantly though. There are many operations that
invalidate the whole buffer's hints, like changing the name
of a function parameter, or doing some git operation
which changes the contents of the whole buffer.  That will
still cause pop-in.  So I don't think it's worth the added
complexity: if you want no scrolling pop-in, set
eglot-lazy-inlay-hints to nil.  Maybe it's not bad for small
buffers and fast servers.

João

reply via email to

[Prev in Thread] Current Thread [Next in Thread]