piersolenski / telescope-import.nvim

Import modules with ease
186 stars 8 forks source link

Feature: Automatically update relative imports to be relative to the current buffer #1

Closed piersolenski closed 3 weeks ago

piersolenski commented 1 year ago

When selecting an import that uses a relative path from another file, the path may be incorrect relative to the current buffer. Automatically updating the path to the current buffer would be a huge time saver.

By removing --no-filename from the flags passed to ripgrep, we can get the original file associated with the import in order to help work out what the new path should be.

piersolenski commented 10 months ago

Tested and working for Javascript/Typescript on https://github.com/piersolenski/telescope-import.nvim/tree/feature/update-paths

piersolenski commented 3 weeks ago

Closing due to the complexity of supporting all languages.