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

Not sure how configuration works #4

Closed diminutivesloop closed 7 years ago

diminutivesloop commented 7 years ago

I tried configuring a simple custom ruleset for TypeScript but it didn't work as I expected. Am I misusing the configuration options somehow?

    "findrelated.rulesets": [
        {
            "name": "angular",
            "rules": [
                {
                    "pattern": "(.*)\\.(?:.ts)$",
                    "locators": [
                        "$1.spec.ts"
                    ]
                }
            ]
        }
    ],
    "findrelated.applyRulesets": [
        "angular"
    ]

When I invoked the extension from TypeScript file I got the following output: Rule(angular).match(src/app/shared/utilities.ts)=false (.*)\.(?:.ts)$

eamodio commented 7 years ago

@diminutivesloop sorry for the delayed response -- I think the issue is with your regex. I think the pattern you want is "(.*)\\.(?:ts)$"

Let me know if that helps.

diminutivesloop commented 7 years ago

Looks like that was my mistake after all. Thanks for the help.

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.