<p>Highlighting is done through <a href="http://scintilla.org">Scintilla</a> lexers, it's not possible to declare syntax from filetype files.  For example the <code>comment_single</code> option is only here to tell editing functions like "toggle comment" what to insert, it doesn't affect how things are styled.</p>

<p>There is 2 solutions to add a new filetype with highlighting:</p>

<ul>
<li>Use styling from another filetype.  Those are "custom filetypes", and set <code>[styling=OtherFiletype]</code> and <code>lexer_filetype=OtherFiletype</code>.</li>
<li>Add a new built-in filetype, including a Scintilla lexer (either one from upstream Scintilla or writing one and submitting it there).</li>
</ul>

<p>I don't know BibTeX, but if it looks anything like LaTeX, you could try something like <code>[styling=LaTeX]</code> and <code>lexer_filtype=LaTeX</code>.  <code>keywords</code> also depends on the lexer used.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1297#issuecomment-259456217">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ87funzWsgcRu8K14Tzq9nDw-5oXks5q8fN1gaJpZM4Ktr6Y">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJwyE3XNuaqP81GSd7J6t9SEmChC9ks5q8fN1gaJpZM4Ktr6Y.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1297#issuecomment-259456217"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@b4n in #1297: Highlighting is done through [Scintilla](http://scintilla.org) lexers, it's not possible to declare syntax from filetype files.  For example the `comment_single` option is only here to tell editing functions like \"toggle comment\" what to insert, it doesn't affect how things are styled.\r\n\r\nThere is 2 solutions to add a new filetype with highlighting:\r\n* Use styling from another filetype.  Those are \"custom filetypes\", and set `[styling=OtherFiletype]` and `lexer_filetype=OtherFiletype`.\r\n* Add a new built-in filetype, including a Scintilla lexer (either one from upstream Scintilla or writing one and submitting it there).\r\n\r\nI don't know BibTeX, but if it looks anything like LaTeX, you could try something like `[styling=LaTeX]` and `lexer_filtype=LaTeX`.  `keywords` also depends on the lexer used."}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1297#issuecomment-259456217"}}}</script>