Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlinked files cannot be highlighted when hovered #195

Closed
mikavilpas opened this issue Jul 14, 2024 · 0 comments · Fixed by #212
Closed

Symlinked files cannot be highlighted when hovered #195

mikavilpas opened this issue Jul 14, 2024 · 0 comments · Fixed by #212
Labels
bug Something isn't working

Comments

@mikavilpas
Copy link
Owner

These are actually the same file, but cannot be highlighted when hovered:

/Users/mikavilpas/dotfiles/.config/nvim/lua/plugins/my-file-manager.lua
/Users/mikavilpas/.config/nvim/lua/plugins/my-file-manager.lua

Some resolution for symlinks is required to fix this 🤔

@mikavilpas mikavilpas added the bug Something isn't working label Jul 14, 2024
mikavilpas added a commit that referenced this issue Jul 16, 2024
I experienced this issue when hovering over my yazi.nvim lazy.nvim spec.
It's symlinked to the actual file in the lazy.nvim repository.

These are the same file:

```sh
/Users/mikavilpas/dotfiles/.config/nvim/lua/plugins/my-file-manager.lua
/Users/mikavilpas/.config/nvim/lua/plugins/my-file-manager.lua
```

This commit fixes the issue by resolving the real path of the file
before
comparing it to the path of the buffer.

Closes #195
mikavilpas added a commit that referenced this issue Jul 16, 2024
* fix: symlinked files cannot be highlighted when hovered

I experienced this issue when hovering over my yazi.nvim lazy.nvim spec.
It's symlinked to the actual file in the lazy.nvim repository.

These are the same file:

```sh
/Users/mikavilpas/dotfiles/.config/nvim/lua/plugins/my-file-manager.lua
/Users/mikavilpas/.config/nvim/lua/plugins/my-file-manager.lua
```

This commit fixes the issue by resolving the real path of the file
before
comparing it to the path of the buffer.

Closes #195

* fixup! fix: symlinked files cannot be highlighted when hovered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant