{"action":"created","issue":{"url":"https://api.github.com/repos/mooz/js2-mode/issues/272","labels_url":"https://api.github.com/repos/mooz/js2-mode/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/mooz/js2-mode/issues/272/comments","events_url":"https://api.github.com/repos/mooz/js2-mode/issues/272/events","html_url":"https://github.com/mooz/js2-mode/issues/272","id":110844857,"number":272,"title":"Faces for variables (all instances) and property access","user":{"login":"nicolasartman","id":563507,"avatar_url":"https://avatars.githubusercontent.com/u/563507?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasartman","html_url":"https://github.com/nicolasartman","followers_url":"https://api.github.com/users/nicolasartman/followers","following_url":"https://api.github.com/users/nicolasartman/following{/other_user}","gists_url":"https://api.github.com/users/nicolasartman/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasartman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasartman/subscriptions","organizations_url":"https://api.github.com/users/nicolasartman/orgs","repos_url":"https://api.github.com/users/nicolasartman/repos","events_url":"https://api.github.com/users/nicolasartman/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasartman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-10-11T09:17:45Z","updated_at":"2015-10-13T11:50:45Z","closed_at":null,"body":"For those of us who like lots of syntax highlighting, it would be great to have all variable instances highlightable with a face, not just params and declarations (so both `bar`s in `let bar; bar += 3;`). It would also be great to have a face for properties, so one could apply styling to `bar` in `foo.bar`.\r\n\r\nAlso, I'm a bit surprised by the face used in keys in object literals. If there was a face for properties, I think that might be appropriate, e.g. for `foo` in `{foo: 'bar'}` and `{'foo': 'bar'}` (though probably not for the `foo` in the ES6 form `[foo]: 7`.)\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/mooz/js2-mode/issues/comments/147693168","html_url":"https://github.com/mooz/js2-mode/issues/272#issuecomment-147693168","issue_url":"https://api.github.com/repos/mooz/js2-mode/issues/272","id":147693168,"user":{"login":"nicolasartman","id":563507,"avatar_url":"https://avatars.githubusercontent.com/u/563507?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasartman","html_url":"https://github.com/nicolasartman","followers_url":"https://api.github.com/users/nicolasartman/followers","following_url":"https://api.github.com/users/nicolasartman/following{/other_user}","gists_url":"https://api.github.com/users/nicolasartman/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasartman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasartman/subscriptions","organizations_url":"https://api.github.com/users/nicolasartman/orgs","repos_url":"https://api.github.com/users/nicolasartman/repos","events_url":"https://api.github.com/users/nicolasartman/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasartman/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T11:50:45Z","updated_at":"2015-10-13T11:50:45Z","body":"Textmate has a language grammar definition based on regexes for start/ending scopes, which is how it colors things (described quite thoroughly [here](https://manual.macromates.com/en/language_grammars))—I forked the default grammar file for javascript and now use my own with those few additions. Since scopes are nestable I just added my own on top of the existing syntax identification it did so I could specially target properties.\r\n\r\nAs far as I understand, Atom uses a system based on textmate's grammar definition. Not sure what sublime uses for parsing. I'm happy to try to answer any question's about textmate's system if it'd be helpful, though as far as I understand, a regex based system like that is far less robust than the proper parser js2-mode has."}}