-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Describe the bug
In img-clip.nvim, the gx behavior resolves image paths relative to the current working directory (cwd), not the file’s directory.
For example, in this markdown file:
/Users/chianyung/Documents/vault-obsidian/notes/dailies/my-notee.md,
an image reference like
requires going two directories up from the note’s location.
However, since the Neovim :pwd (cwd) is /Users/chianyung/Documents/vault-obsidian, the plugin tries to resolve the path relative to that instead — causing an error when opening the image with the system, because it ends up looking in the wrong place.
Steps to reproduce
Steps to reproduce the behavior:
- Create a file.md in nested folder.
- Place you cursor below the image in the markdown file and try to open with system app with
gx
Expected behavior
It will be open with system app but because it relative it should be open from the current buffer file path not cwd
Screenshots
Desktop (please complete the following information):
- OS: macOS
- Neovim version: 0.11.4