From 6fb33d18a4b53c9fb0543151405fdd28956bf0ab Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 8 May 2024 10:51:37 -0700 Subject: [PATCH] Update syntax highlighting --- .../kotlin/explorer/KotlinExplorer.kt | 4 +- .../resources/themes/kotlin_explorer.xml | 70 +++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 src/jvmMain/resources/themes/kotlin_explorer.xml diff --git a/src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/KotlinExplorer.kt b/src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/KotlinExplorer.kt index 2e920e3f..cb51cb10 100644 --- a/src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/KotlinExplorer.kt +++ b/src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/KotlinExplorer.kt @@ -448,8 +448,8 @@ private fun RSyntaxTextArea.configureSyntaxTextArea(syntaxStyle: String, focusTr private fun applyTheme(textArea: RSyntaxTextArea) { try { - val theme = Theme.load(RSyntaxTextArea::class.java.getResourceAsStream( - "/org/fife/ui/rsyntaxtextarea/themes/idea.xml") + val theme = Theme.load(UiState::class.java.getResourceAsStream( + "/themes/kotlin_explorer.xml") ) theme.apply(textArea) } catch (ioe: IOException) { diff --git a/src/jvmMain/resources/themes/kotlin_explorer.xml b/src/jvmMain/resources/themes/kotlin_explorer.xml new file mode 100644 index 00000000..91a48512 --- /dev/null +++ b/src/jvmMain/resources/themes/kotlin_explorer.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +