{"action":"created","issue":{"url":"https://api.github.com/repos/atom/autocomplete-plus/issues/403","labels_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/403/comments","events_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/403/events","html_url":"https://github.com/atom/autocomplete-plus/issues/403","id":69339687,"number":403,"title":"Are there any recommendations for tag completions?","user":{"login":"DWand","id":4358089,"avatar_url":"https://avatars.githubusercontent.com/u/4358089?v=3","gravatar_id":"","url":"https://api.github.com/users/DWand","html_url":"https://github.com/DWand","followers_url":"https://api.github.com/users/DWand/followers","following_url":"https://api.github.com/users/DWand/following{/other_user}","gists_url":"https://api.github.com/users/DWand/gists{/gist_id}","starred_url":"https://api.github.com/users/DWand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DWand/subscriptions","organizations_url":"https://api.github.com/users/DWand/orgs","repos_url":"https://api.github.com/users/DWand/repos","events_url":"https://api.github.com/users/DWand/events{/privacy}","received_events_url":"https://api.github.com/users/DWand/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-18T19:24:52Z","updated_at":"2015-07-22T00:01:48Z","closed_at":"2015-07-22T00:01:48Z","body":"Hello. I would like to add a list of completions for [apiDoc](https://github.com/apidoc/apidoc) syntax to Atom (probably, port [this Sublime Text plugin](https://github.com/DWand/SublimeText_apiDoc_autocompletion)). It seems that creating a provider for autocomplete-plus is a great way to accomplish this task (as it is easy, flexible and kinda declarative). Thank you for this package.\r\n\r\nThis syntax is like JavaDoc, JsDoc, PhpDoc, etc. So, I'd like to ask if there are any recommendations of how to build such kind of stuff.\r\n\r\n*It worth to be mentioned that I've never used Atom before. I don't have any experience with its plugin system. So, I may be totally wrong.*\r\n\r\nI've created a little draft plugin:\r\n```js\r\n// provider.js\r\nfunction Suggestion(name, snippet, isDeprecated) {\r\n  this.snippet = snippet;\r\n  this.type = 'tag';\r\n  this.leftLabel = 'apiDoc';\r\n  this.rightLabel = isDeprecated ? 'deprecated' : '';\r\n}\r\n\r\nvar suggestions = [\r\n  new Suggestion(\"@api\", \"@api {${1:method}} ${2:path} ${3:[title]}\"),\r\n  new Suggestion(\"@apiDefine\", \"@apiDefine ${1:name} ${2:[title]}\\n${3:* }           ${4:[description]}\"),\r\n  new Suggestion(\"@apiDescription\", \"@apiDescription ${1:text}\"),\r\n  new Suggestion(\"@apiError\", \"@apiError ${1:[{group\\}]} ${2:[{type\\}]} ${3:field} ${4:[description]}\"),\r\n  // 30 tags are ommited\r\n  new Suggestion(\"@apiSuccessTitle\", \"@apiSuccessTitle {${1:group}} ${2:description}\", true)\r\n];\r\n\r\nmodule.exports = {\r\n  selector: '*',\r\n  getSuggestions: function getSuggestions(options) {\r\n    console.log(options.scopeDescriptor.scopes, options);\r\n    return suggestions;\r\n  }\r\n};\r\n```\r\nand it gives the following output:\r\n![default](https://cloud.githubusercontent.com/assets/4358089/7216781/e3f52c7e-e613-11e4-97e3-c6c11b12cbf8.PNG)\r\n\r\nAt this point I've got the following questions:\r\n\r\n1. What should be passed to `leftLabel` and `rightLabel` properties in case of tags?\r\n\r\n2. How to handle deprecated things properly?\r\n\r\n3. I have pretty long snippets (up to ~90 characters). Is there any way to replace them with some name instead of printing the whole thing to suggestions list? For example, show \"@apiParam\" instead of \"@apiParam [{group]} [{type]} [field=defaultValue] [description]\"?\r\n\r\n4. It looks like autocompete-plus doesn't aware of context - it simply shows options returned from providers. But, if a user types \"@apiError\", then he, probably, does not want to replace it with \"@apiDefineSuccessStructure\". Will such kind of filtering be provided by autocomplete-plus internally in the future or providers have to do it on their own?\r\n\r\n5. This question is related to the previous one, but covers another aspect - sorting. Will autocomplete-plus sort suggestions by relevance (for example, like Sublime Text) or providers have to sort suggestions on their own?\r\n\r\n6. How to handle optional elements? For example, tag \"@apiDefine\" can either have a \"title\" field or don't have this field. At this moment, I've wrapped such elements with `[` and `]` characters.\r\n\r\n7. What to do in case the default value (or, probably, a placeholder) in snippet contains symbols `{` and `}`? In the provided example \"@apiError\" tag has the following construction: `${1:[{group\\}]}`, but Atom inserts it like `[{group]}` instead of `[{group}]`."},"comment":{"url":"https://api.github.com/repos/atom/autocomplete-plus/issues/comments/123512668","html_url":"https://github.com/atom/autocomplete-plus/issues/403#issuecomment-123512668","issue_url":"https://api.github.com/repos/atom/autocomplete-plus/issues/403","id":123512668,"user":{"login":"benogle","id":69169,"avatar_url":"https://avatars.githubusercontent.com/u/69169?v=3","gravatar_id":"","url":"https://api.github.com/users/benogle","html_url":"https://github.com/benogle","followers_url":"https://api.github.com/users/benogle/followers","following_url":"https://api.github.com/users/benogle/following{/other_user}","gists_url":"https://api.github.com/users/benogle/gists{/gist_id}","starred_url":"https://api.github.com/users/benogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benogle/subscriptions","organizations_url":"https://api.github.com/users/benogle/orgs","repos_url":"https://api.github.com/users/benogle/repos","events_url":"https://api.github.com/users/benogle/events{/privacy}","received_events_url":"https://api.github.com/users/benogle/received_events","type":"User","site_admin":true},"created_at":"2015-07-22T00:01:48Z","updated_at":"2015-07-22T00:01:48Z","body":"Closing as it seems this ended in the provider created in #425."}}