[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64101: 29.0.91; Eglot inlay hints rendered out of order
From: |
Eli Zaretskii |
Subject: |
bug#64101: 29.0.91; Eglot inlay hints rendered out of order |
Date: |
Sat, 17 Jun 2023 10:56:30 +0300 |
> From: Krzysztof Klimonda <kklimonda@syntaxhighlighted.com>
> Date: Thu, 15 Jun 2023 23:23:45 +0200
>
>
> When using eglot with rust-analyzer some inlay hints are not rendered
> correctly. For example, in the following code snippet, inlay hint for
> the `let vec =` is rendered as such:
>
> > >>>Vec<Arc<Mutex<Item:
>
> and not
>
> > : <Vec<Arc<Mutex<Item>>>
>
> It works fine for simple hints (like `let x` in my example).
>
> Looking at what's happening, it seems eglot is creating separate
> overlays for each element of the returned `InlayHintLabelPart` with
> the same beginning in the buffer. From poking around I've noticed
> that overlays have been rewritten recently, and the order of overlays
> for the given position no longer seems to be fixed.
>
> Code example below:
> ---8<---8<---8<---
> use std::sync::{Arc, Mutex};
>
> mod static_uninit;
>
> struct Item;
>
> fn test() {
> let vec = vec![Arc::new(Mutex::new(Item))];
> let x = 1;
> }
> ---8<---8<---8<---
João, are you looking into this? Should the overlays created for the
inlay hints be forced to be sorted in some particular order?
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, Krzysztof Klimonda, 2023/06/16
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order,
Eli Zaretskii <=
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, João Távora, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, Eli Zaretskii, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, João Távora, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, Eli Zaretskii, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, João Távora, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, Eli Zaretskii, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, João Távora, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, Eli Zaretskii, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, João Távora, 2023/06/17
- bug#64101: 29.0.91; Eglot inlay hints rendered out of order, Krzysztof Klimonda, 2023/06/17