eamodio / vscode-find-related

Finds files related to the current file based on user-defined configuration rules in VS Code
MIT License
30 stars 12 forks source link

Exclude current file from related files list #21

Closed Peeja closed 1 year ago

Peeja commented 4 years ago

I have this custom ruleset:

    {
      "name": "javascript",
      "rules": [
        {
          "pattern": "(.*?)(?:\\.(?:test|story))?\\.(?:js|ts|jsx|tsx)$",
          "locators": ["$1.{js,ts,jsx,tsx}","$1.{test,story}.{js,ts,jsx,tsx}"]
        },
      ],
    },

Out of a collection of related files (so far, the implementation, the test, and the Storybook stories), I'd like to be able to jump between any of them. However, by capturing them all this way, I'm also capturing the original file I'm in. To exclude the current file, I'd have to (I think) have a separate pattern for each kind of file, each with a different locator to match the other two kinds of files, which would be super verbose.

Given that there's never a reason to open the file that's already open, could the extension just leave out the current file even if the locator matches it?

eamodio commented 1 year ago

I believe this issue should be resolved in the latest pre-release edition. Can you please give it a try to confirm that the issue is resolved for you? Thanks!

You can switch to the pre-release edition, by clicking on the "Switch to Pre-Release version of this extension" from the Extensions view.

github-actions[bot] commented 1 year ago

This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!

github-actions[bot] commented 1 year ago

Closing this issue because it needs more information and has not had recent activity. Please re-open this issue if more details can be provided. Thanks!

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.