{"action":"created","issue":{"url":"https://api.github.com/repos/atom/snippets/issues/194","repository_url":"https://api.github.com/repos/atom/snippets","labels_url":"https://api.github.com/repos/atom/snippets/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/atom/snippets/issues/194/comments","events_url":"https://api.github.com/repos/atom/snippets/issues/194/events","html_url":"https://github.com/atom/snippets/pull/194","id":138841736,"number":194,"title":"Added more formatting options for snippets","user":{"login":"PierBover","id":226483,"avatar_url":"https://avatars.githubusercontent.com/u/226483?v=3","gravatar_id":"","url":"https://api.github.com/users/PierBover","html_url":"https://github.com/PierBover","followers_url":"https://api.github.com/users/PierBover/followers","following_url":"https://api.github.com/users/PierBover/following{/other_user}","gists_url":"https://api.github.com/users/PierBover/gists{/gist_id}","starred_url":"https://api.github.com/users/PierBover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierBover/subscriptions","organizations_url":"https://api.github.com/users/PierBover/orgs","repos_url":"https://api.github.com/users/PierBover/repos","events_url":"https://api.github.com/users/PierBover/events{/privacy}","received_events_url":"https://api.github.com/users/PierBover/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/snippets/labels/needs-testing","name":"needs-testing","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-03-06T21:42:37Z","updated_at":"2016-03-24T19:46:23Z","closed_at":"2016-03-24T19:34:07Z","pull_request":{"url":"https://api.github.com/repos/atom/snippets/pulls/194","html_url":"https://github.com/atom/snippets/pull/194","diff_url":"https://github.com/atom/snippets/pull/194.diff","patch_url":"https://github.com/atom/snippets/pull/194.patch"},"body":"When working on a snippet I was wondering how other packages formatted the results in the autocomplete list. So I found the `autocomplete-plus` API can accept [more parameters for formatting the results](https://github.com/atom/autocomplete-plus/wiki/Provider-API).\r\n\r\n> `leftLabel` (optional): This is shown before the suggestion. Useful for return values.\r\n`leftLabelHTML` (optional): Use this instead of leftLabel if you want to use html for the left label.\r\n`rightLabel` (optional): An indicator (e.g. function, variable) denoting the \"kind\" of suggestion this represents\r\n`rightLabelHTML` (optional): Use this instead of rightLabel if you want to use html for the right label.\r\n\r\nI thought it would be awesome to be able to visually format results for snippets too, so I have added those properties in the Snippet class so that you could add those in the cson files that define snippets.\r\n\r\nThe idea is to read those optional properties from the cson file and provide them to [autocomplete-snippets](https://github.com/atom/autocomplete-snippets) which in turn will deliver those results to autocomplete-plus.\r\n\r\n**Additions to the Snippet class** (All parameters are optional)\r\n* rightLabelHTML\r\n* leftLabel\r\n* leftLabelHTML\r\n\r\nI haven't added rightLabel because `autocomplete-snippets` uses the `name` of the snippet to fill that and  is what all current snippets use to display some info.\r\n\r\nI have also worked on `autocomplete-snippets` locally, but I will wait for this pull request to be accepted before submitting it there."},"comment":{"url":"https://api.github.com/repos/atom/snippets/issues/comments/200988630","html_url":"https://github.com/atom/snippets/pull/194#issuecomment-200988630","issue_url":"https://api.github.com/repos/atom/snippets/issues/194","id":200988630,"user":{"login":"PierBover","id":226483,"avatar_url":"https://avatars.githubusercontent.com/u/226483?v=3","gravatar_id":"","url":"https://api.github.com/users/PierBover","html_url":"https://github.com/PierBover","followers_url":"https://api.github.com/users/PierBover/followers","following_url":"https://api.github.com/users/PierBover/following{/other_user}","gists_url":"https://api.github.com/users/PierBover/gists{/gist_id}","starred_url":"https://api.github.com/users/PierBover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierBover/subscriptions","organizations_url":"https://api.github.com/users/PierBover/orgs","repos_url":"https://api.github.com/users/PierBover/repos","events_url":"https://api.github.com/users/PierBover/events{/privacy}","received_events_url":"https://api.github.com/users/PierBover/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T19:46:23Z","updated_at":"2016-03-24T19:46:23Z","body":"Yay! :)\r\n\r\nI've been super busy but I will create the PR on `autocomplete-snippets` these days."}}