{"action":"created","issue":{"url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/335","repository_url":"https://api.github.com/repos/SublimeTextIssues/Core","labels_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/335/comments","events_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/335/events","html_url":"https://github.com/SublimeTextIssues/Core/issues/335","id":35540618,"number":335,"title":"Goto Definition could prefer language syntax scope definitions first  ","user":{"login":"gerardroche","id":44148,"avatar_url":"https://avatars.githubusercontent.com/u/44148?v=3","gravatar_id":"","url":"https://api.github.com/users/gerardroche","html_url":"https://github.com/gerardroche","followers_url":"https://api.github.com/users/gerardroche/followers","following_url":"https://api.github.com/users/gerardroche/following{/other_user}","gists_url":"https://api.github.com/users/gerardroche/gists{/gist_id}","starred_url":"https://api.github.com/users/gerardroche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerardroche/subscriptions","organizations_url":"https://api.github.com/users/gerardroche/orgs","repos_url":"https://api.github.com/users/gerardroche/repos","events_url":"https://api.github.com/users/gerardroche/events{/privacy}","received_events_url":"https://api.github.com/users/gerardroche/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/C:%20Go%20To%20Definition","name":"C: Go To Definition","color":"669933"},{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/S:%20trivial","name":"S: trivial","color":"F7C9B2"},{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/T:%20enhancement","name":"T: enhancement","color":"1975E7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2014-06-12T00:19:56Z","updated_at":"2016-09-30T16:51:12Z","closed_at":null,"body":"# Example\r\n\r\nYou have 2 files of different languages `rb` and `php`.\r\n\r\n    # exporter.rb\r\n    module Export\r\n      class Exporter\r\n      end\r\n    end\r\n\r\nand\r\n\r\n    // exporter.php\r\n    class Exporter {}\r\n\r\nand your current working file is a `php` file\r\n\r\n    // current.php\r\n    $variable = new Exporter();\r\n    \r\nWith the cursor anywhere on `Exporter`, run the command `Goto definition...`.\r\n\r\n## Actual\r\n\r\nThe overlay lists **two** possible definition locations:\r\n\r\n    1: exporter.rb\r\n    2: exporter.php\r\n\r\n## Expected\r\n\r\n`Goto definition...` to only use the current scope. In the case above, `Goto definition...` would just directly to the `php` definition because that was the scope when `Goto definition...` was triggered.\r\n\r\nAt the very least the `php` definition should be listed first.\r\n\r\n    1: exporter.php\r\n    2: exporter.rb\r\n\r\nI prefer for `Goto definition...` to use the current scope, because I can't even think of a valid use case where I would expect, in use cases like this, to goto the `rb` definition.\r\n\r\n## Vim \r\n\r\nVim for example, by default, jumps to the first definition. However, it also allows modifiers to the jump e.g. `N` where n is a index of the list so `4C-]` would jump to the 4th possible definition, it also allows to jump or show list if more than one possibility. \r\n"},"comment":{"url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/comments/250795319","html_url":"https://github.com/SublimeTextIssues/Core/issues/335#issuecomment-250795319","issue_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/335","id":250795319,"user":{"login":"michaelblyons","id":2701605,"avatar_url":"https://avatars.githubusercontent.com/u/2701605?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelblyons","html_url":"https://github.com/michaelblyons","followers_url":"https://api.github.com/users/michaelblyons/followers","following_url":"https://api.github.com/users/michaelblyons/following{/other_user}","gists_url":"https://api.github.com/users/michaelblyons/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelblyons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelblyons/subscriptions","organizations_url":"https://api.github.com/users/michaelblyons/orgs","repos_url":"https://api.github.com/users/michaelblyons/repos","events_url":"https://api.github.com/users/michaelblyons/events{/privacy}","received_events_url":"https://api.github.com/users/michaelblyons/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T16:51:12Z","updated_at":"2016-09-30T16:51:12Z","body":"I use IronLangs which point from one language (say Ruby or Python) to another (like C#). I am totally cool with _preferring_ the same language first, but I absolutely do not want other languages to be excluded.\r\n\r\nBacklinking https://github.com/sublimehq/Packages/issues/647."}}
{"actor":{"display_login":"michaelblyons"}}