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

Easier way to link files far away from each other in directory tree? #213

Open
Nezteb opened this issue Nov 9, 2023 · 0 comments
Open

Comments

@Nezteb
Copy link

Nezteb commented Nov 9, 2023

I use multi-root workspaces, and the comment anchors extension works fine with those. However, I'd like there to be an easier way to link files many directories apart.

Say I have two files in two different projects each added to my multi-root workspace:

// ~/Git/project_abc/src/server/database/schema/cart.ts

const schema = {
    // ...
}
// ~/Git/xyz_project/src/client/web/state/reducers/cart.ts

const checkout = () => {
    // NOTE: See schema for more details:
    // LINK ../../../../../../project_abc/src/server/database/schema/cart.ts
    // ...
}

Notice that the LINK relative path is quite long. I have a few ideas:

// Option 1: Allow a project identifier prefix that only links if the given project is part of the workspace
// LINK project_abc:src/server/database/schema/cart.ts

// Option 2: Support tilde home path expansion
// LINK ~/Git/project_abc/src/server/database/schema/cart.ts

// Option 3: Add a config option to set a base directory to search (defaults to home directory?)
// In settings.json: "commentAnchors.baseDir": "~/Git"
// LINK project_abc/src/server/database/schema/cart.ts

Let me know what y'all think. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant