<p>Okay, I got it working. File name has to be <code>filetypes.Kotlin.conf</code>.</p>
<p><code>~/.config/geany/filedefs/filetypes.Kotlin.conf</code>:</p>
<div class="highlight highlight-source-ini"><pre><span class="pl-en">[styling=C]</span>
<span class="pl-en">[keywords]</span>
<span class="pl-c"><span class="pl-c">#</span> https://kotlinlang.org/docs/reference/keyword-reference.html</span>
<span class="pl-k">primary</span>=abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while true false null as fun in object typealias val var when by constructor delegate dynamic field file get init param property receiver set setparam where actual annotation companion const crossinline data expect external infix inline inner internal lateinit noinline open operator out reified sealed suspend tailrec vararg field it
<span class="pl-c"><span class="pl-c">#</span> https://kotlinlang.org/docs/reference/basic-types.html</span>
<span class="pl-k">secondary</span>=Double Float Long Int Short Byte NaN Void
<span class="pl-c"><span class="pl-c">#</span> documentation keywords for javadoc</span>
<span class="pl-k">doccomment</span>=author deprecated exception param return see serial serialData serialField since throws todo version
<span class="pl-k">typedefs</span>=
<span class="pl-en">[lexer_properties=C]</span>
<span class="pl-en">[settings]</span>
<span class="pl-k">lexer_filetype</span>=C
<span class="pl-k">tag_parser</span>=C
<span class="pl-k">extension</span>=kt
<span class="pl-k">mime_type</span>=text/x-kotlin
<span class="pl-en">[build-menu]</span>
<span class="pl-k">FT_00_LB</span>=_Compile Kotlin Class
<span class="pl-k">FT_00_CM</span>=kotlinc <span class="pl-s"><span class="pl-pds">"</span>%f<span class="pl-pds">"</span></span>
<span class="pl-k">FT_00_WD</span>=
<span class="pl-k">EX_00_LB</span>=_Execute Kotlin Class
<span class="pl-k">EX_00_CM</span>=kotlin <span class="pl-s"><span class="pl-pds">"</span>%eKt<span class="pl-pds">"</span></span>
<span class="pl-k">EX_00_WD</span>=
<span class="pl-k">EX_01_LB</span>=Execute Kotlin _Script
<span class="pl-k">EX_01_CM</span>=kotlinc -script <span class="pl-s"><span class="pl-pds">"</span>%f<span class="pl-pds">"</span></span>
<span class="pl-k">EX_01_WD</span>=</pre></div>
<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/1581#issuecomment-405233764">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ8-vXnj0mDn6pWeMYiRMfAFxAHxbks5uHIlkgaJpZM4O8lkX">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ7av0vyxw6y1on0YjCe64OjJh5ICks5uHIlkgaJpZM4O8lkX.gif" height="1" width="1" alt="" /></p>
<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://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@esotericpig in #1581: Okay, I got it working. File name has to be `filetypes.Kotlin.conf`.\r\n\r\n`~/.config/geany/filedefs/filetypes.Kotlin.conf`:\r\n```INI\r\n[styling=C]\r\n\r\n[keywords]\r\n# https://kotlinlang.org/docs/reference/keyword-reference.html\r\nprimary=abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while true false null as fun in object typealias val var when by constructor delegate dynamic field file get init param property receiver set setparam where actual annotation companion const crossinline data expect external infix inline inner internal lateinit noinline open operator out reified sealed suspend tailrec vararg field it\r\n# https://kotlinlang.org/docs/reference/basic-types.html\r\nsecondary=Double Float Long Int Short Byte NaN Void\r\n# documentation keywords for javadoc\r\ndoccomment=author deprecated exception param return see serial serialData serialField since throws todo version\r\ntypedefs=\r\n\r\n[lexer_properties=C]\r\n\r\n[settings]\r\nlexer_filetype=C\r\ntag_parser=C\r\nextension=kt\r\nmime_type=text/x-kotlin\r\n\r\n[build-menu]\r\nFT_00_LB=_Compile Kotlin Class\r\nFT_00_CM=kotlinc \"%f\"\r\nFT_00_WD=\r\n\r\nEX_00_LB=_Execute Kotlin Class\r\nEX_00_CM=kotlin \"%eKt\"\r\nEX_00_WD=\r\n\r\nEX_01_LB=Execute Kotlin _Script\r\nEX_01_CM=kotlinc -script \"%f\"\r\nEX_01_WD=\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1581#issuecomment-405233764"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/1581#issuecomment-405233764",
"url": "https://github.com/geany/geany/issues/1581#issuecomment-405233764",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [geany/geany] Kotlin Language Support (#1581)",
"sections": [
{
"text": "",
"activityTitle": "**Jonathan Bradley Whited**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@esotericpig",
"facts": [
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1581,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1581\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany/issues/1581#issuecomment-405233764"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 250763543\n}"
}
],
"themeColor": "26292E"
}
]</script>