{"action":"created","issue":{"url":"https://api.github.com/repos/agda/agda/issues/2268","repository_url":"https://api.github.com/repos/agda/agda","labels_url":"https://api.github.com/repos/agda/agda/issues/2268/labels{/name}","comments_url":"https://api.github.com/repos/agda/agda/issues/2268/comments","events_url":"https://api.github.com/repos/agda/agda/issues/2268/events","html_url":"https://github.com/agda/agda/issues/2268","id":183752246,"number":2268,"title":"Wrong coloring of OPTIONS pragma","user":{"login":"guillaumebrunerie","id":787865,"avatar_url":"https://avatars.githubusercontent.com/u/787865?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaumebrunerie","html_url":"https://github.com/guillaumebrunerie","followers_url":"https://api.github.com/users/guillaumebrunerie/followers","following_url":"https://api.github.com/users/guillaumebrunerie/following{/other_user}","gists_url":"https://api.github.com/users/guillaumebrunerie/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaumebrunerie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaumebrunerie/subscriptions","organizations_url":"https://api.github.com/users/guillaumebrunerie/orgs","repos_url":"https://api.github.com/users/guillaumebrunerie/repos","events_url":"https://api.github.com/users/guillaumebrunerie/events{/privacy}","received_events_url":"https://api.github.com/users/guillaumebrunerie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-18T17:28:33Z","updated_at":"2016-10-18T17:53:38Z","closed_at":null,"body":"The syntax coloring of\r\n```agda\r\n{-# OPTIONS --foo #-}\r\n```\r\nis (mildly) broken. It displays the inital `{-#` in black, the word `OPTIONS` in yellow, and the rest of the line in red, including the final `#-}`.\r\nThe reason is that font-lock is used for automatically highlighting `--`-comments and that Agda’s smart highlighting cannot override that (and the two dashes before `foo` are detected as the beginning of a comment).\r\n\r\nOne way to fix it is to disable automatic highlighting of comments altogether, the main drawback being that `--`-comments won’t be colored before loading the file (they will be colored as before after loading, of course). Note that automatic highlighting of `{- -}`-comments is already disabled because of issue #1559. \r\n\r\nDo people care about having `--`-comments already colored before the file is loaded?"},"comment":{"url":"https://api.github.com/repos/agda/agda/issues/comments/254586801","html_url":"https://github.com/agda/agda/issues/2268#issuecomment-254586801","issue_url":"https://api.github.com/repos/agda/agda/issues/2268","id":254586801,"user":{"login":"guillaumebrunerie","id":787865,"avatar_url":"https://avatars.githubusercontent.com/u/787865?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaumebrunerie","html_url":"https://github.com/guillaumebrunerie","followers_url":"https://api.github.com/users/guillaumebrunerie/followers","following_url":"https://api.github.com/users/guillaumebrunerie/following{/other_user}","gists_url":"https://api.github.com/users/guillaumebrunerie/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaumebrunerie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaumebrunerie/subscriptions","organizations_url":"https://api.github.com/users/guillaumebrunerie/orgs","repos_url":"https://api.github.com/users/guillaumebrunerie/repos","events_url":"https://api.github.com/users/guillaumebrunerie/events{/privacy}","received_events_url":"https://api.github.com/users/guillaumebrunerie/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T17:53:38Z","updated_at":"2016-10-18T17:53:38Z","body":"Actually I just noticed another drawback of disabling automatic highlighting of `--`-comments.\r\nCurrently, adding `--` in the middle (or at the beginning) of a line in a file which is already loaded will color the rest of line in red instantly, but with what I am proposing it will have to wait until the file is loaded again.\r\n\r\nSo I can answer to myself, I do care about it :)\r\nThe issue about the wrong coloring of `{-# OPTIONS --foo #-}` remains, though."}}
{"actor":{"display_login":"guillaumebrunerie"}}