unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64101: 29.0.91; Eglot inlay hints rendered out of order
@ 2023-06-15 21:23 Krzysztof Klimonda
  2023-06-17  7:56 ` Eli Zaretskii
  2023-06-17 20:54 ` Milan Jovanovic
  0 siblings, 2 replies; 35+ messages in thread
From: Krzysztof Klimonda @ 2023-06-15 21:23 UTC (permalink / raw)
  To: 64101


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<---




In GNU Emacs 29.0.91 (build 1, x86_64-apple-darwin22.3.0, NS
appkit-2299.40 Version 13.2.1 (Build 22D68)) of 2023-06-11 built on
sapphire.local
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.2.1

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs-plus@29/29.0.90/share/info/emacs
--prefix=/usr/local/Cellar/emacs-plus@29/29.0.90 --with-xml2
--with-gnutls --with-native-compilation --without-compress-install
--without-dbus --without-imagemagick --with-modules --with-rsvg
--with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
-march=nehalem -mmacosx-version-min=13
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
'CPPFLAGS=-I/usr/local/opt/zlib/include -I/usr/local/opt/jpeg/include
-I/usr/local/opt/icu4c/include -I/usr/local/opt/openssl@1.1/include
-F/usr/local/Frameworks
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
'LDFLAGS=-L/usr/local/opt/zlib/lib -L/usr/local/opt/jpeg/lib
-L/usr/local/opt/icu4c/lib -L/usr/local/opt/openssl@1.1/lib
-L/usr/local/lib -F/usr/local/Frameworks
-Wl,-headerpad_max_install_names
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
-L/usr/local/opt/libgccjit/lib''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Rust

Minor modes in effect:
  shell-dirtrack-mode: t
  eglot-inlay-hints-mode: t
  eglot--managed-mode: t
  flymake-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils misearch multi-isearch pulse color rust-ts-mode
c-ts-common treesit etags fileloop generator time-date shell pcomplete
eglot external-completion array filenotify jsonrpc ert pp ewoc debug
backtrace find-func xref flymake-proc flymake thingatpt compile
text-property-search comint ansi-osc ansi-color ring pcase url-util
url-parse auth-source eieio eieio-core password-cache json map url-vars
project byte-opt imenu vc-git diff-mode easy-mmode vc-dispatcher
cl-loaddefs comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv
cl-extra help-mode bytecomp byte-compile cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads kqueue cocoa ns lcms2 multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 161413 14006)
(symbols 48 12244 0)
(strings 32 41810 3481)
(string-bytes 1 1383853)
(vectors 16 31896)
(vector-slots 8 582797 14839)
(floats 8 140 71)
(intervals 56 375 0)
(buffers 984 22))





^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2023-06-20 13:50 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-15 21:23 bug#64101: 29.0.91; Eglot inlay hints rendered out of order Krzysztof Klimonda
2023-06-17  7:56 ` Eli Zaretskii
2023-06-17  9:39   ` João Távora
2023-06-17 10:41     ` Eli Zaretskii
2023-06-17 12:19       ` João Távora
2023-06-17 13:17         ` Eli Zaretskii
2023-06-17 13:26           ` João Távora
2023-06-17 14:12             ` Eli Zaretskii
2023-06-17 14:29               ` João Távora
2023-06-17 15:50                 ` Eli Zaretskii
2023-06-17 16:45                   ` João Távora
2023-06-17 12:26     ` Krzysztof Klimonda
2023-06-17 19:02     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-17 22:25       ` João Távora
2023-06-18  0:45         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18  8:47           ` João Távora
2023-06-18 14:18             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 14:22           ` João Távora
2023-06-18 14:29             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 14:36             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 15:20               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-19 16:17             ` Milan Jovanovic
2023-06-19 16:34               ` João Távora
2023-06-19 18:06                 ` Milan Jovanovic
2023-06-19 19:08                   ` João Távora
2023-06-19 21:05                     ` Milan Jovanovic
2023-06-19 22:38                       ` João Távora
2023-06-20 11:10                       ` Eli Zaretskii
2023-06-20 11:32                         ` Milan Jovanovic
2023-06-20 12:01                           ` Eli Zaretskii
2023-06-20 13:34                             ` Milan Jovanovic
2023-06-20 13:46                               ` Eli Zaretskii
2023-06-20 13:50                               ` João Távora
2023-06-17 20:54 ` Milan Jovanovic
2023-06-17 22:35   ` João Távora

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).