{"action":"created","comment":{"url":"https://api.github.com/repos/sublimehq/Packages/pulls/comments/79512306","id":79512306,"diff_hunk":"@@ -147,6 +147,46 @@ contexts:\n     - match: '{{typeprefix}}'\n       push: single-type-expression\n \n+  annotation:\n+    - match: '(@){{plainid}}\\.'\n+      captures:\n+        0: storage.modifier.annotation.scala\n+        1: punctuation.definition.annotation.scala\n+      push:\n+        - meta_scope: meta.annotation.scala\n+        - match: '{{plainid}}\\.'\n+          scope: storage.modifier.annotation.scala\n+        - match: '{{plainid}}'\n+          scope: storage.modifier.annotation.scala\n+          set: annotation-parameters\n+    - match: '(@){{plainid}}'\n+      captures:\n+        0: storage.modifier.annotation.scala\n+        1: punctuation.definition.annotation.scala\n+      push: annotation-parameters\n+\n+  annotation-parameters:\n+    - meta_scope: meta.annotation.scala\n+    - match: \\(\n+      scope: punctuation.definition.arguments.annotation.begin.scala\n+      push:\n+        - match: ','\n+          scope: punctuation.separator.arguments.annotation.scala\n+        - match: \\)\n+          scope: punctuation.definition.arguments.annotation.end.scala","path":"Scala/Scala.sublime-syntax","position":42,"original_position":42,"commit_id":"50036c959319be47ba17a9412b9a32c7aacc2e26","original_commit_id":"50036c959319be47ba17a9412b9a32c7aacc2e26","user":{"login":"wbond","id":41734,"avatar_url":"https://avatars.githubusercontent.com/u/41734?v=3","gravatar_id":"","url":"https://api.github.com/users/wbond","html_url":"https://github.com/wbond","followers_url":"https://api.github.com/users/wbond/followers","following_url":"https://api.github.com/users/wbond/following{/other_user}","gists_url":"https://api.github.com/users/wbond/gists{/gist_id}","starred_url":"https://api.github.com/users/wbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbond/subscriptions","organizations_url":"https://api.github.com/users/wbond/orgs","repos_url":"https://api.github.com/users/wbond/repos","events_url":"https://api.github.com/users/wbond/events{/privacy}","received_events_url":"https://api.github.com/users/wbond/received_events","type":"User","site_admin":false},"body":"Also `punctuation.section.arguments...`.","created_at":"2016-09-19T23:40:58Z","updated_at":"2016-09-19T23:40:58Z","html_url":"https://github.com/sublimehq/Packages/pull/605#discussion_r79512306","pull_request_url":"https://api.github.com/repos/sublimehq/Packages/pulls/605","_links":{"self":{"href":"https://api.github.com/repos/sublimehq/Packages/pulls/comments/79512306"},"html":{"href":"https://github.com/sublimehq/Packages/pull/605#discussion_r79512306"},"pull_request":{"href":"https://api.github.com/repos/sublimehq/Packages/pulls/605"}}},"pull_request":{"url":"https://api.github.com/repos/sublimehq/Packages/pulls/605","id":83011982,"html_url":"https://github.com/sublimehq/Packages/pull/605","diff_url":"https://github.com/sublimehq/Packages/pull/605.diff","patch_url":"https://github.com/sublimehq/Packages/pull/605.patch","issue_url":"https://api.github.com/repos/sublimehq/Packages/issues/605","number":605,"state":"open","locked":false,"title":"[Scala] add support for annotations","user":{"login":"gwenzek","id":5920036,"avatar_url":"https://avatars.githubusercontent.com/u/5920036?v=3","gravatar_id":"","url":"https://api.github.com/users/gwenzek","html_url":"https://github.com/gwenzek","followers_url":"https://api.github.com/users/gwenzek/followers","following_url":"https://api.github.com/users/gwenzek/following{/other_user}","gists_url":"https://api.github.com/users/gwenzek/gists{/gist_id}","starred_url":"https://api.github.com/users/gwenzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwenzek/subscriptions","organizations_url":"https://api.github.com/users/gwenzek/orgs","repos_url":"https://api.github.com/users/gwenzek/repos","events_url":"https://api.github.com/users/gwenzek/events{/privacy}","received_events_url":"https://api.github.com/users/gwenzek/received_events","type":"User","site_admin":false},"body":"As mentioned in #588, I propose to add support for annotations.\r\nI based myself on http://www.scala-lang.org/files/archive/spec/2.11/11-annotations.html .\r\n\r\nI used the scope `storage.modifier.annotation.scala` on annotations.\r\nThis provide coloring in most themes due to `storage.modifier`and is easily customizable.\r\n\r\n```scala\r\n@deprecated(\"Use D\", \"1.0\") class C { ... }\r\n// ^^ storage.modifier.annotation\r\n//            ^^ string\r\n\r\n@transient @volatile var m: Int\r\n// ^^ storage.modifier.annotation\r\n\r\nString @local\r\n//     ^^ storage.modifier.annotation\r\n\r\n(e: @unchecked) match { ... }\r\n//  ^^ storage.modifier.annotation\r\n//              ^^^^^ keyword.control.flow.scala\r\n\r\n// more complex:\r\n@scala.beans.BeanProperty\r\n//  ^^^^^^^^^^^^^^^^^^^^^ storage.modifier.annotation\r\n\r\n(e: Int @unchecked) match { ... }\r\n//  ^^ storage.type.primitive\r\n//      ^^ storage.modifier.annotation\r\n//                  ^^^^^ keyword.control.flow.scala\r\n\r\ntrait Function0[@specialized(Unit, Int, Double) T] {\r\n//               ^^ storage.modifier.annotation\r\n//                           ^^ storage.type.primitive\r\n//                                              ^ support.class\r\n  def apply: T\r\n}\r\n\r\n```\r\n\r\n**Note**\r\nI match annotations with `{{plainid}}` regex, but we might want to support something more complex in the future.\r\n\r\nI handle `@specialized` separately because it's the only annotation I know that uses type parameters between `(`.\r\n","created_at":"2016-08-28T10:37:05Z","updated_at":"2016-09-19T23:44:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bf95cb382b011a11db4b122eb3d0e3c34a331a5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sublimehq/Packages/pulls/605/commits","review_comments_url":"https://api.github.com/repos/sublimehq/Packages/pulls/605/comments","review_comment_url":"https://api.github.com/repos/sublimehq/Packages/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sublimehq/Packages/issues/605/comments","statuses_url":"https://api.github.com/repos/sublimehq/Packages/statuses/50036c959319be47ba17a9412b9a32c7aacc2e26","head":{"label":"gwenzek:feature/annotation","ref":"feature/annotation","sha":"50036c959319be47ba17a9412b9a32c7aacc2e26","user":{"login":"gwenzek","id":5920036,"avatar_url":"https://avatars.githubusercontent.com/u/5920036?v=3","gravatar_id":"","url":"https://api.github.com/users/gwenzek","html_url":"https://github.com/gwenzek","followers_url":"https://api.github.com/users/gwenzek/followers","following_url":"https://api.github.com/users/gwenzek/following{/other_user}","gists_url":"https://api.github.com/users/gwenzek/gists{/gist_id}","starred_url":"https://api.github.com/users/gwenzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwenzek/subscriptions","organizations_url":"https://api.github.com/users/gwenzek/orgs","repos_url":"https://api.github.com/users/gwenzek/repos","events_url":"https://api.github.com/users/gwenzek/events{/privacy}","received_events_url":"https://api.github.com/users/gwenzek/received_events","type":"User","site_admin":false},"repo":{"id":41446801,"name":"Packages","full_name":"gwenzek/Packages","owner":{"login":"gwenzek","id":5920036,"avatar_url":"https://avatars.githubusercontent.com/u/5920036?v=3","gravatar_id":"","url":"https://api.github.com/users/gwenzek","html_url":"https://github.com/gwenzek","followers_url":"https://api.github.com/users/gwenzek/followers","following_url":"https://api.github.com/users/gwenzek/following{/other_user}","gists_url":"https://api.github.com/users/gwenzek/gists{/gist_id}","starred_url":"https://api.github.com/users/gwenzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwenzek/subscriptions","organizations_url":"https://api.github.com/users/gwenzek/orgs","repos_url":"https://api.github.com/users/gwenzek/repos","events_url":"https://api.github.com/users/gwenzek/events{/privacy}","received_events_url":"https://api.github.com/users/gwenzek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gwenzek/Packages","description":"","fork":true,"url":"https://api.github.com/repos/gwenzek/Packages","forks_url":"https://api.github.com/repos/gwenzek/Packages/forks","keys_url":"https://api.github.com/repos/gwenzek/Packages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gwenzek/Packages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gwenzek/Packages/teams","hooks_url":"https://api.github.com/repos/gwenzek/Packages/hooks","issue_events_url":"https://api.github.com/repos/gwenzek/Packages/issues/events{/number}","events_url":"https://api.github.com/repos/gwenzek/Packages/events","assignees_url":"https://api.github.com/repos/gwenzek/Packages/assignees{/user}","branches_url":"https://api.github.com/repos/gwenzek/Packages/branches{/branch}","tags_url":"https://api.github.com/repos/gwenzek/Packages/tags","blobs_url":"https://api.github.com/repos/gwenzek/Packages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gwenzek/Packages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gwenzek/Packages/git/refs{/sha}","trees_url":"https://api.github.com/repos/gwenzek/Packages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gwenzek/Packages/statuses/{sha}","languages_url":"https://api.github.com/repos/gwenzek/Packages/languages","stargazers_url":"https://api.github.com/repos/gwenzek/Packages/stargazers","contributors_url":"https://api.github.com/repos/gwenzek/Packages/contributors","subscribers_url":"https://api.github.com/repos/gwenzek/Packages/subscribers","subscription_url":"https://api.github.com/repos/gwenzek/Packages/subscription","commits_url":"https://api.github.com/repos/gwenzek/Packages/commits{/sha}","git_commits_url":"https://api.github.com/repos/gwenzek/Packages/git/commits{/sha}","comments_url":"https://api.github.com/repos/gwenzek/Packages/comments{/number}","issue_comment_url":"https://api.github.com/repos/gwenzek/Packages/issues/comments{/number}","contents_url":"https://api.github.com/repos/gwenzek/Packages/contents/{+path}","compare_url":"https://api.github.com/repos/gwenzek/Packages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gwenzek/Packages/merges","archive_url":"https://api.github.com/repos/gwenzek/Packages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gwenzek/Packages/downloads","issues_url":"https://api.github.com/repos/gwenzek/Packages/issues{/number}","pulls_url":"https://api.github.com/repos/gwenzek/Packages/pulls{/number}","milestones_url":"https://api.github.com/repos/gwenzek/Packages/milestones{/number}","notifications_url":"https://api.github.com/repos/gwenzek/Packages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gwenzek/Packages/labels{/name}","releases_url":"https://api.github.com/repos/gwenzek/Packages/releases{/id}","deployments_url":"https://api.github.com/repos/gwenzek/Packages/deployments","created_at":"2015-08-26T19:55:44Z","updated_at":"2016-02-03T21:56:31Z","pushed_at":"2016-09-19T23:11:42Z","git_url":"git://github.com/gwenzek/Packages.git","ssh_url":"git@github.com:gwenzek/Packages.git","clone_url":"https://github.com/gwenzek/Packages.git","svn_url":"https://github.com/gwenzek/Packages","homepage":null,"size":3998,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sublimehq:master","ref":"master","sha":"b03686a46ec3aef97098a636df0348600aca6933","user":{"login":"sublimehq","id":1161584,"avatar_url":"https://avatars.githubusercontent.com/u/1161584?v=3","gravatar_id":"","url":"https://api.github.com/users/sublimehq","html_url":"https://github.com/sublimehq","followers_url":"https://api.github.com/users/sublimehq/followers","following_url":"https://api.github.com/users/sublimehq/following{/other_user}","gists_url":"https://api.github.com/users/sublimehq/gists{/gist_id}","starred_url":"https://api.github.com/users/sublimehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sublimehq/subscriptions","organizations_url":"https://api.github.com/users/sublimehq/orgs","repos_url":"https://api.github.com/users/sublimehq/repos","events_url":"https://api.github.com/users/sublimehq/events{/privacy}","received_events_url":"https://api.github.com/users/sublimehq/received_events","type":"User","site_admin":false},"repo":{"id":37357499,"name":"Packages","full_name":"sublimehq/Packages","owner":{"login":"sublimehq","id":1161584,"avatar_url":"https://avatars.githubusercontent.com/u/1161584?v=3","gravatar_id":"","url":"https://api.github.com/users/sublimehq","html_url":"https://github.com/sublimehq","followers_url":"https://api.github.com/users/sublimehq/followers","following_url":"https://api.github.com/users/sublimehq/following{/other_user}","gists_url":"https://api.github.com/users/sublimehq/gists{/gist_id}","starred_url":"https://api.github.com/users/sublimehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sublimehq/subscriptions","organizations_url":"https://api.github.com/users/sublimehq/orgs","repos_url":"https://api.github.com/users/sublimehq/repos","events_url":"https://api.github.com/users/sublimehq/events{/privacy}","received_events_url":"https://api.github.com/users/sublimehq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sublimehq/Packages","description":"","fork":false,"url":"https://api.github.com/repos/sublimehq/Packages","forks_url":"https://api.github.com/repos/sublimehq/Packages/forks","keys_url":"https://api.github.com/repos/sublimehq/Packages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sublimehq/Packages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sublimehq/Packages/teams","hooks_url":"https://api.github.com/repos/sublimehq/Packages/hooks","issue_events_url":"https://api.github.com/repos/sublimehq/Packages/issues/events{/number}","events_url":"https://api.github.com/repos/sublimehq/Packages/events","assignees_url":"https://api.github.com/repos/sublimehq/Packages/assignees{/user}","branches_url":"https://api.github.com/repos/sublimehq/Packages/branches{/branch}","tags_url":"https://api.github.com/repos/sublimehq/Packages/tags","blobs_url":"https://api.github.com/repos/sublimehq/Packages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sublimehq/Packages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sublimehq/Packages/git/refs{/sha}","trees_url":"https://api.github.com/repos/sublimehq/Packages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sublimehq/Packages/statuses/{sha}","languages_url":"https://api.github.com/repos/sublimehq/Packages/languages","stargazers_url":"https://api.github.com/repos/sublimehq/Packages/stargazers","contributors_url":"https://api.github.com/repos/sublimehq/Packages/contributors","subscribers_url":"https://api.github.com/repos/sublimehq/Packages/subscribers","subscription_url":"https://api.github.com/repos/sublimehq/Packages/subscription","commits_url":"https://api.github.com/repos/sublimehq/Packages/commits{/sha}","git_commits_url":"https://api.github.com/repos/sublimehq/Packages/git/commits{/sha}","comments_url":"https://api.github.com/repos/sublimehq/Packages/comments{/number}","issue_comment_url":"https://api.github.com/repos/sublimehq/Packages/issues/comments{/number}","contents_url":"https://api.github.com/repos/sublimehq/Packages/contents/{+path}","compare_url":"https://api.github.com/repos/sublimehq/Packages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sublimehq/Packages/merges","archive_url":"https://api.github.com/repos/sublimehq/Packages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sublimehq/Packages/downloads","issues_url":"https://api.github.com/repos/sublimehq/Packages/issues{/number}","pulls_url":"https://api.github.com/repos/sublimehq/Packages/pulls{/number}","milestones_url":"https://api.github.com/repos/sublimehq/Packages/milestones{/number}","notifications_url":"https://api.github.com/repos/sublimehq/Packages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sublimehq/Packages/labels{/name}","releases_url":"https://api.github.com/repos/sublimehq/Packages/releases{/id}","deployments_url":"https://api.github.com/repos/sublimehq/Packages/deployments","created_at":"2015-06-13T04:17:44Z","updated_at":"2016-09-19T11:52:05Z","pushed_at":"2016-09-19T23:11:43Z","git_url":"git://github.com/sublimehq/Packages.git","ssh_url":"git@github.com:sublimehq/Packages.git","clone_url":"https://github.com/sublimehq/Packages.git","svn_url":"https://github.com/sublimehq/Packages","homepage":null,"size":5055,"stargazers_count":2513,"watchers_count":2513,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":260,"mirror_url":null,"open_issues_count":67,"forks":260,"open_issues":67,"watchers":2513,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sublimehq/Packages/pulls/605"},"html":{"href":"https://github.com/sublimehq/Packages/pull/605"},"issue":{"href":"https://api.github.com/repos/sublimehq/Packages/issues/605"},"comments":{"href":"https://api.github.com/repos/sublimehq/Packages/issues/605/comments"},"review_comments":{"href":"https://api.github.com/repos/sublimehq/Packages/pulls/605/comments"},"review_comment":{"href":"https://api.github.com/repos/sublimehq/Packages/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sublimehq/Packages/pulls/605/commits"},"statuses":{"href":"https://api.github.com/repos/sublimehq/Packages/statuses/50036c959319be47ba17a9412b9a32c7aacc2e26"}}}}
{"actor":{"display_login":"wbond"}}