{"action":"created","issue":{"url":"https://api.github.com/repos/eamodio/vscode-find-related/issues/5","repository_url":"https://api.github.com/repos/eamodio/vscode-find-related","labels_url":"https://api.github.com/repos/eamodio/vscode-find-related/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/eamodio/vscode-find-related/issues/5/comments","events_url":"https://api.github.com/repos/eamodio/vscode-find-related/issues/5/events","html_url":"https://github.com/eamodio/vscode-find-related/issues/5","id":265276027,"number":5,"title":"Match priority order","user":{"login":"diminutivesloop","id":667716,"avatar_url":"https://avatars0.githubusercontent.com/u/667716?v=4","gravatar_id":"","url":"https://api.github.com/users/diminutivesloop","html_url":"https://github.com/diminutivesloop","followers_url":"https://api.github.com/users/diminutivesloop/followers","following_url":"https://api.github.com/users/diminutivesloop/following{/other_user}","gists_url":"https://api.github.com/users/diminutivesloop/gists{/gist_id}","starred_url":"https://api.github.com/users/diminutivesloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diminutivesloop/subscriptions","organizations_url":"https://api.github.com/users/diminutivesloop/orgs","repos_url":"https://api.github.com/users/diminutivesloop/repos","events_url":"https://api.github.com/users/diminutivesloop/events{/privacy}","received_events_url":"https://api.github.com/users/diminutivesloop/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-13T12:43:03Z","updated_at":"2018-04-22T07:58:29Z","closed_at":"2018-04-22T07:58:29Z","author_association":"NONE","body":"<!--\r\nIf you are encountering an issue that says `See output channel for more details`, please enable output channel logging by setting `\"findrelated.outputLevel\": \"verbose\"` in your settings.json. This will enable logging to the FindRelated channel in the Output pane. Once enabled, please attempt to reproduce the issue (if possible) and attach the relevant log lines from the FindRelated channel.\r\n-->\r\n\r\nIt would be helpful if the list of related files corresponded to the order of the configured locators. For example I currently have the following rule for Angular spec files:\r\n```json\r\n{\r\n    \"pattern\": \"(.*)\\\\.(?:spec.ts)$\",\r\n    \"locators\": [\r\n        \"{$1.ts,$1.html,$1.scss}\"\r\n    ]\r\n}\r\n```\r\nSince I placed the locator for the main component typescript file first in the locators list I would expect it to also appear first in the results list. However currently this order is ignored and I always see the template html file first in the list."},"comment":{"url":"https://api.github.com/repos/eamodio/vscode-find-related/issues/comments/383363093","html_url":"https://github.com/eamodio/vscode-find-related/issues/5#issuecomment-383363093","issue_url":"https://api.github.com/repos/eamodio/vscode-find-related/issues/5","id":383363093,"user":{"login":"eamodio","id":641685,"avatar_url":"https://avatars1.githubusercontent.com/u/641685?v=4","gravatar_id":"","url":"https://api.github.com/users/eamodio","html_url":"https://github.com/eamodio","followers_url":"https://api.github.com/users/eamodio/followers","following_url":"https://api.github.com/users/eamodio/following{/other_user}","gists_url":"https://api.github.com/users/eamodio/gists{/gist_id}","starred_url":"https://api.github.com/users/eamodio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eamodio/subscriptions","organizations_url":"https://api.github.com/users/eamodio/orgs","repos_url":"https://api.github.com/users/eamodio/repos","events_url":"https://api.github.com/users/eamodio/events{/privacy}","received_events_url":"https://api.github.com/users/eamodio/received_events","type":"User","site_admin":false},"created_at":"2018-04-22T07:58:29Z","updated_at":"2018-04-22T07:58:29Z","author_association":"OWNER","body":"@diminutivesloop So sorry for the incredibly long delay, but this is supported today, just not in the way you currently have it.\r\n\r\nIf you want to control the ordering, you'll need to separate the locators into different items in the array:\r\n\r\n```json\r\n{\r\n    \"pattern\": \"(.*)\\\\.(?:spec.ts)$\",\r\n    \"locators\": [\r\n        \"$1.ts\", \"$1.html\", \"$1.scss\"\r\n    ]\r\n}\r\n```\r\n\r\nThat should cause any `ts` files to be first, then `html`, and finally `scss`\r\n\r\nThe way you currently have it is more efficient as it is a single file system scan (using that glob pattern), but because of that order is not honored in the results -- they are ordered by how ever the file-system returns the results of the search."}}
{"actor":{"display_login":"eamodio"}}