{"action":"created","issue":{"url":"https://api.github.com/repos/lervag/vimtex/issues/895","repository_url":"https://api.github.com/repos/lervag/vimtex","labels_url":"https://api.github.com/repos/lervag/vimtex/issues/895/labels{/name}","comments_url":"https://api.github.com/repos/lervag/vimtex/issues/895/comments","events_url":"https://api.github.com/repos/lervag/vimtex/issues/895/events","html_url":"https://github.com/lervag/vimtex/issues/895","id":240499767,"number":895,"title":"Highlighting artefacts with g:vimtex_syntax_minted","user":{"login":"aldanor","id":2418513,"avatar_url":"https://avatars3.githubusercontent.com/u/2418513?v=3","gravatar_id":"","url":"https://api.github.com/users/aldanor","html_url":"https://github.com/aldanor","followers_url":"https://api.github.com/users/aldanor/followers","following_url":"https://api.github.com/users/aldanor/following{/other_user}","gists_url":"https://api.github.com/users/aldanor/gists{/gist_id}","starred_url":"https://api.github.com/users/aldanor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldanor/subscriptions","organizations_url":"https://api.github.com/users/aldanor/orgs","repos_url":"https://api.github.com/users/aldanor/repos","events_url":"https://api.github.com/users/aldanor/events{/privacy}","received_events_url":"https://api.github.com/users/aldanor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-04T21:28:03Z","updated_at":"2017-07-05T20:29:21Z","closed_at":"2017-07-05T20:29:21Z","body":"Here's the minimal vimtex config:\r\n\r\n```vim\r\nlet g:vimtex_syntax_minted = [\r\n      \\ { 'lang': 'cpp', 'environments': ['cppcode'] },\r\n      \\ { 'lang': 'python', 'environments': ['pythoncode'] },\r\n      \\]\r\n```\r\n\r\nFor some reason, Python environments (all other languages are ok, far as I've noticed) have this highlighting problem:\r\n\r\n<img width=\"156\" alt=\"screen shot 2017-07-04 at 22 21 11\" src=\"https://user-images.githubusercontent.com/2418513/27843017-5b15e6de-6107-11e7-83d0-6d18808d07c9.png\">\r\n\r\nHighlighting within the environment itself is fine; it's just the `\\begin` part."},"comment":{"url":"https://api.github.com/repos/lervag/vimtex/issues/comments/313217687","html_url":"https://github.com/lervag/vimtex/issues/895#issuecomment-313217687","issue_url":"https://api.github.com/repos/lervag/vimtex/issues/895","id":313217687,"user":{"login":"lervag","id":998898,"avatar_url":"https://avatars2.githubusercontent.com/u/998898?v=3","gravatar_id":"","url":"https://api.github.com/users/lervag","html_url":"https://github.com/lervag","followers_url":"https://api.github.com/users/lervag/followers","following_url":"https://api.github.com/users/lervag/following{/other_user}","gists_url":"https://api.github.com/users/lervag/gists{/gist_id}","starred_url":"https://api.github.com/users/lervag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lervag/subscriptions","organizations_url":"https://api.github.com/users/lervag/orgs","repos_url":"https://api.github.com/users/lervag/repos","events_url":"https://api.github.com/users/lervag/events{/privacy}","received_events_url":"https://api.github.com/users/lervag/received_events","type":"User","site_admin":false},"created_at":"2017-07-05T20:29:21Z","updated_at":"2017-07-05T20:29:21Z","body":"See `:h g:vimtex_syntax_minted`. In particular note the `ignore` key and how it is used for the python example:\r\n\r\n```vim\r\nlet g:vimtex_syntax_minted = [\r\n      \\ {\r\n      \\   'lang' : 'python',\r\n      \\   'ignore' : [\r\n      \\     'pythonEscape',\r\n      \\     'pythonBEscape',\r\n      \\     ],\r\n      \\ }\r\n      \\]\r\n```\r\n\r\n----\r\n\r\nTo be more specific: The problem here is that the first `\\b` is detected as a `pythonEscape` syntax element. By ignoring the syntax group we evade this problem."}}
{"actor":{"display_login":"lervag"}}