{"action":"created","issue":{"url":"https://api.github.com/repos/foo123/codemirror-grammar/issues/6","repository_url":"https://api.github.com/repos/foo123/codemirror-grammar","labels_url":"https://api.github.com/repos/foo123/codemirror-grammar/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/foo123/codemirror-grammar/issues/6/comments","events_url":"https://api.github.com/repos/foo123/codemirror-grammar/issues/6/events","html_url":"https://github.com/foo123/codemirror-grammar/issues/6","id":137096938,"number":6,"title":"Getting context for autocompletion","user":{"login":"snipervld","id":12143129,"avatar_url":"https://avatars.githubusercontent.com/u/12143129?v=3","gravatar_id":"","url":"https://api.github.com/users/snipervld","html_url":"https://github.com/snipervld","followers_url":"https://api.github.com/users/snipervld/followers","following_url":"https://api.github.com/users/snipervld/following{/other_user}","gists_url":"https://api.github.com/users/snipervld/gists{/gist_id}","starred_url":"https://api.github.com/users/snipervld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snipervld/subscriptions","organizations_url":"https://api.github.com/users/snipervld/orgs","repos_url":"https://api.github.com/users/snipervld/repos","events_url":"https://api.github.com/users/snipervld/events{/privacy}","received_events_url":"https://api.github.com/users/snipervld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-02-28T21:15:50Z","updated_at":"2016-03-11T23:33:28Z","closed_at":null,"body":"Hi. I'm currently writing grammar for one language using CodeMirror Grammar and it's awesome!\r\nNow, i'm implementing autocompletion hints.\r\nEx, type \"SELECT * FROM\" -> Press \"Space\" -> Will show list with keywords:\r\n* Table1\r\n* Table2\r\n* FooTable\r\nand others\r\n\r\nI implemented this behaviour (with lint-\"magic\"), but HOW to do this after press \"Space\" without typing any char? In particularly, how to get expected keyword groups (for example, grouped by `meta` property)?\r\n\r\nlint-\"magic\": when user types, for example, \"SE\", hint-interceptor call editor.performLint() to get all errors and parses this list to understand current \"context\" (appropriate words). (i.e. keyword \"SET\" cannot be at the start of SQL statement, only \"SELECT\" (and others))\r\nThanks! ~~Sorry for my bad English...~~"},"comment":{"url":"https://api.github.com/repos/foo123/codemirror-grammar/issues/comments/195603067","html_url":"https://github.com/foo123/codemirror-grammar/issues/6#issuecomment-195603067","issue_url":"https://api.github.com/repos/foo123/codemirror-grammar/issues/6","id":195603067,"user":{"login":"foo123","id":1263582,"avatar_url":"https://avatars.githubusercontent.com/u/1263582?v=3","gravatar_id":"","url":"https://api.github.com/users/foo123","html_url":"https://github.com/foo123","followers_url":"https://api.github.com/users/foo123/followers","following_url":"https://api.github.com/users/foo123/following{/other_user}","gists_url":"https://api.github.com/users/foo123/gists{/gist_id}","starred_url":"https://api.github.com/users/foo123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foo123/subscriptions","organizations_url":"https://api.github.com/users/foo123/orgs","repos_url":"https://api.github.com/users/foo123/repos","events_url":"https://api.github.com/users/foo123/events{/privacy}","received_events_url":"https://api.github.com/users/foo123/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T23:33:28Z","updated_at":"2016-03-11T23:33:28Z","body":"The properties `context` and `in-context` are completely different than what you need and refer to actions (like `unique identifier action`) that only takes place inside a given context (for example to check `unique xml tag property names` one creates a new context when a tag token opens and closes it when a tag closes).  Similarly `..state.ctx` stores that information but is reset when not needed, thus you will most probably find `null` there"}}