{"id":16710628,"url":"https://github.com/mdgriffith/atom-inline-messenger-example","last_synced_at":"2025-03-15T03:15:50.823Z","repository":{"id":77476096,"uuid":"39218170","full_name":"mdgriffith/atom-inline-messenger-example","owner":"mdgriffith","description":"An example of using the Atom Inline Messenger.","archived":false,"fork":false,"pushed_at":"2016-08-28T17:46:05.000Z","size":361,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T18:51:25.649Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdgriffith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-16T20:12:07.000Z","updated_at":"2015-07-18T03:17:42.000Z","dependencies_parsed_at":"2023-09-05T21:30:48.355Z","dependency_job_id":null,"html_url":"https://github.com/mdgriffith/atom-inline-messenger-example","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fatom-inline-messenger-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fatom-inline-messenger-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fatom-inline-messenger-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fatom-inline-messenger-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdgriffith","download_url":"https://codeload.github.com/mdgriffith/atom-inline-messenger-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676782,"owners_count":20329434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T20:09:08.738Z","updated_at":"2025-03-15T03:15:50.817Z","avatar_url":"https://github.com/mdgriffith.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\n\nThis package has example usage of the [inline messenger](https://github.com/mdgriffith/atom-inline-messenger) package.\n\nAfter installing this package, hit `cmd-alt-+`.  A new page will be created with some example messages and a code suggestion.\nUse `alt-up` or `alt-down` to scroll through the messages, and `cmd-shift-a` to accept the suggestion.\n\nInline messenger provides a service for use in other Atom projects. With it, a package can show messages next to the relevant, highlighted code,  and optionally make a code suggestion for the selected text. To use it, include `inline-messenger` in the `consumedServices` section of your `package.json`:\n\n```json\n{\n  \"name\": \"my-package\",\n  \"consumedServices\": {\n    \"inline-messenger\": {\n      \"versions\": {\n        \"^1.0.0\": \"consumeInlineMessenger\"\n      }\n    }\n  }\n}\n```\n\nThen call methods on the service in your package's main module.\n\nThe `message` creates a message in the active editor.\n\n```coffee\nmodule.exports =\n  activate: -\u003e\n    @messages = []\n\n  consumeInlineMessenger: (messenger) -\u003e\n    @messenger = messenger\n\n    @messages.push @messenger.message\n              range: [[22,0], [25,8]]\n              text: \"A New Message\"\n              severity: \"warning\"\n\n    @messages.push @messenger.message\n              range: [[35,0], [35,8]]\n              text: \"A New Code Suggestion\"\n              suggestion: \"myNewCodeSuggestion();\"\n\n  deactivate: -\u003e\n    @messages.map (msg) -\u003e msg.destroy()\n    @messages = []\n```\n\n## The Message Command\n\nThe message method takes the following parameters\n  * `range` - The range to highlight in the editor\n  * `text` - The text to display in the message\n  * `severity` - Can be any of the following: info, warning, error, suggestion.  This will affect the coloring of the message.\n  * `suggestion` - Provide a code suggestion to replace the highlighted text.\n\n\n## Commands\n  * `next-message` -\u003e Jumps to the next message.  The default keyboard shortcut is alt-down\n  * `prev-message` -\u003e Jumps to the previous message.  The default keyboard shortcut is alt-up\n  * `accept-suggestion` -\u003e If the current message is a code suggestion, this command will make the suggested changes for you.  The default is cmd-shift-a\n\n\n## Settings\n  * `Message Positioning` - For messages that span multiple lines, show them either below the highlighted code or to the right.  Defaults to below.\n  * `Show Keyboard Shortcut For Suggestions` - Show keyboard shortcut reminder at the bottom of a suggestion.  Defaults to true.\n  * `Accept Suggestion Animation` - Show a small highlight flash when suggested code is accepted.  Defaults to true.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Fatom-inline-messenger-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdgriffith%2Fatom-inline-messenger-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Fatom-inline-messenger-example/lists"}