Zulip Chat Archive
Stream: Emacs
Topic: Work arounds for using the Mathcal letter?
Kent Van Vels (Jan 02 2025 at 18:17):
Hi, I guess it is a known issue that the goal-window in emacs doesn't play nice with the calligraphic math letters like
𝓛 𝓝 𝓡
It seems like there is an issue with it missing a trailing space. Is there a work-around for this?
Yury G. Kudryashov (Jan 02 2025 at 18:38):
Works for me
Yury G. Kudryashov (Jan 02 2025 at 18:38):
(I tried an example with a type called 𝓡
)
Kevin Buzzard (Jan 02 2025 at 18:42):
I know nothing about Lean in emacs but could this be a font issue rather than an emacs issue?
Kent Van Vels (Jan 02 2025 at 20:10):
@Yury G. Kudryashov , I am having the problem you mentions in this post , I thought it was other mathcal letters too, like the principal filter. I will update my lean4 mode and see if that changes anything.
Yury G. Kudryashov (Jan 02 2025 at 20:13):
This is a different issue: if a line contains some Unicode characters, then lsp client&server count them as different number of characters, hence the server thinks that you're inserting text at a wrong position.
Kent Van Vels (Jan 02 2025 at 20:46):
Yeah, that is the issue I am having. I have some luck killing then yanking the lines.
Kent Van Vels (Mar 04 2025 at 18:23):
For anyone's information, I have been using Emacs inside a terminal (as all good hackers do) today and I think I have been having some luck with this issue.
I am leaving this post here as remind to report more later.
Yury G. Kudryashov (Mar 14 2025 at 20:41):
@Kent Van Vels Any details?
Joseph Myers (Mar 15 2025 at 01:33):
The patch at https://github.com/yyoncho/lsp-mode/commit/aac9b6a10611ce9fcb4c9fe272f2835f0b6bb210 (as linked from https://github.com/emacs-lsp/lsp-mode/issues/2080 ) works for me (at least once I deleted the lsp-mode.elc that had been byte-compiled before I patched lsp-mode.el). Though if some version of https://github.com/leanprover/lean4/pull/2646 got into Lean then that might avoid the lsp-mode issue by allowing the use of UTF-32 LSP.
Yury G. Kudryashov (Mar 15 2025 at 04:53):
I'll try to figure out how to apply a patch to lsp-mode
in NixOS tomorrow.
Yury G. Kudryashov (Mar 15 2025 at 04:53):
Thanks for the link!
Kent Van Vels (Mar 15 2025 at 22:24):
@Yury G. Kudryashov, it still had the same problems. The letters were truly monospace though.
Mekeor Melire (Apr 23 2025 at 22:07):
Related quote from this message:
Eglot has one key advantage over lsp-mode: it correctly handles LSP's weird specification of source positions, where column numbers have to be in terms of 16-bit Unicode. lsp-mode still doesn't[.]
Yury G. Kudryashov (Apr 23 2025 at 22:34):
Note: the patch worked.
Yury G. Kudryashov (Apr 23 2025 at 22:35):
I'm OK with switching from lsp-mode
to Eglot if we can figure out how to get syntax highlighting work.
Mekeor Melire (Apr 23 2025 at 22:42):
The plan is to support both lsp-mode as well as Eglot. Both have their up- and downsides respectively.
As far as I know, no one is currently actively working on making Eglot support semantic tokens. There are one or two third-party packages that extend Eglot with this intention, but I haven't tried them out yet.
Last updated: May 02 2025 at 03:31 UTC