Replies: 1 comment
-
This is a bug in clangd |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When opening a path that does not contain a symlink and then one that does, two buffers are opened, even if the referenced files are the same.
This sounds like a rare and insignificant issue, but it isn't. Clangd's go to definition implementation seems to always yield a canonicalized path. Combine that with the home directory being a symlink (which is the default on Fedora Kinoite) and you will get a horrible DX, where a
g d
press opens a buffer different from the one already opened. This in turn causes edits in one buffer to not appear in the other.Using a bisect I could determine that the bug was exacerbated in 8444f52. I don't think it is the original cause though; it just caused me to notice the issue.
Reproduction Steps
mkdir actual
ln -s actual/ symlink
echo something > actual/test.txt
hx --vsplit actual/test.txt symlink/test.txt
At this point, you will have two buffers open that reference the same file. Edits in one buffer will not appear in the other one.
Helix log
I don't think it helps much, but here it is anyway:
https://paste.gg/p/anonymous/fe9473d1c89d46f6991f72863130f594
Platform
Linux, Fedora Kinoite
Terminal Emulator
Wezterm 20240203-110809-5046fc22
Installation Method
Built from source (nix profile install)
Helix Version
3fcf168
Beta Was this translation helpful? Give feedback.
All reactions