{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/VisualRust/issues/201","labels_url":"https://api.github.com/repos/PistonDevelopers/VisualRust/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/VisualRust/issues/201/comments","events_url":"https://api.github.com/repos/PistonDevelopers/VisualRust/issues/201/events","html_url":"https://github.com/PistonDevelopers/VisualRust/pull/201","id":125133954,"number":201,"title":"Use DocumentState for indentation tokens","user":{"login":"siler","id":1622279,"avatar_url":"https://avatars.githubusercontent.com/u/1622279?v=3","gravatar_id":"","url":"https://api.github.com/users/siler","html_url":"https://github.com/siler","followers_url":"https://api.github.com/users/siler/followers","following_url":"https://api.github.com/users/siler/following{/other_user}","gists_url":"https://api.github.com/users/siler/gists{/gist_id}","starred_url":"https://api.github.com/users/siler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siler/subscriptions","organizations_url":"https://api.github.com/users/siler/orgs","repos_url":"https://api.github.com/users/siler/repos","events_url":"https://api.github.com/users/siler/events{/privacy}","received_events_url":"https://api.github.com/users/siler/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-06T08:31:13Z","updated_at":"2016-01-19T21:38:23Z","closed_at":"2016-01-19T07:43:22Z","pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/VisualRust/pulls/201","html_url":"https://github.com/PistonDevelopers/VisualRust/pull/201","diff_url":"https://github.com/PistonDevelopers/VisualRust/pull/201.diff","patch_url":"https://github.com/PistonDevelopers/VisualRust/pull/201.patch"},"body":"This uses the DocumentState for each given ITextBuffer to retrieve relevant tokens. It could probably be further improved to get rid of the TextSnapshot in general and rely entirely on the cached tokens. That would take a bit more refactoring/testing. I think this resolves #94."},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/VisualRust/issues/comments/172995374","html_url":"https://github.com/PistonDevelopers/VisualRust/pull/201#issuecomment-172995374","issue_url":"https://api.github.com/repos/PistonDevelopers/VisualRust/issues/201","id":172995374,"user":{"login":"siler","id":1622279,"avatar_url":"https://avatars.githubusercontent.com/u/1622279?v=3","gravatar_id":"","url":"https://api.github.com/users/siler","html_url":"https://github.com/siler","followers_url":"https://api.github.com/users/siler/followers","following_url":"https://api.github.com/users/siler/following{/other_user}","gists_url":"https://api.github.com/users/siler/gists{/gist_id}","starred_url":"https://api.github.com/users/siler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siler/subscriptions","organizations_url":"https://api.github.com/users/siler/orgs","repos_url":"https://api.github.com/users/siler/repos","events_url":"https://api.github.com/users/siler/events{/privacy}","received_events_url":"https://api.github.com/users/siler/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T21:38:23Z","updated_at":"2016-01-19T21:38:23Z","body":"I can take a look at those other places and potentially also look into solving the TextSnapshot reliance.\r\n\r\nI was also thinking about using the TokensChangedEvent on DocumentState to automatically update a map of line numbers -> expected indentation levels but I was having a bit of trouble understanding how to use TrackingTokens to do that. I'll look into it a bit more and come back with a more specific question if I get stuck."}}