Skip to content

Path relative to current file instead of cwd #7

@tobiasandersen

Description

@tobiasandersen

Thanks for making this great plugin! Can I make it insert the path relative to my current file? Perhaps easier to explain with an example.

Let's say I have the following folder structure:

├── src
│   ├── lib
│   │   ├── utils.js
│   ├── modules
│       ├── example
│           ├── index.js

I open .src/modules/example/index.js and type: import * from './utils.js'. Then it will correctly find the path of ./src/lib/utils.js, but when I hit enter it insert the path relative to the cwd (./src/lib/utils.js). Is there a way to instead insert the path relative to where I searched from(../../lib/utils.js)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions