<p>I've noticed a peculiarity in regards to how the Ruby lexer styles colons. A literal that starts with a colon is of course a symbol, but colons are used in other contexts as well, most notably for hash literals, like this snippet from the Ruby docs:</p>

<p><code>options = { font_size: 10, font_family: "Arial" }</code></p>

<p>If you put this in Geany, it will style the colons as symbol literals and not as operators as it should.</p>

<p>This is more important for the Ruby-like static language Crystal, in which the Ruby lexer is almost totally sufficient--aside from the fact it only supports primary keywords and not secondary, class, or type keywords--where this notation is used for named tuples, as well as for type annotation for functions: `def square(n: Int32): Int32'</p>

<p>TL;DR: A colon at the start of a word should indicate a symbol literal, but a colon by itself or at the end of a word should be styled as an operator or punctuation.</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/issues/1121">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/ABDrJ9hqjn8_iDtnv4rrJOCtxz9AAHZ7ks5qTB1RgaJpZM4JGhMy">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJyXhZ7VUYIxSWtHtf4AQGWA9vmkqks5qTB1RgaJpZM4JGhMy.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/issues/1121"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>