JetBrains / kotlin-netbeans

Kotlin Plugin for NetBeans https://kotlinlang.org
Other
94 stars 26 forks source link

The syntax colouring is ignored when starting NetBeans #119

Open negora opened 7 years ago

negora commented 7 years ago

Hello:

I've configured my own syntax colouring for the Kotlin source code. I've done this with the options located at Tools -> Options -> Fonts & Colors -> Language: Kotlin. It has taken some time to achieve this, but I've configured it and the changes have taken effect.

However, when I've closed NetBeans and run it again, the configuration has been completely ignored, turning back to the one by default. I've opened the configuration panel, and my settings were all gone :S .

I've made some tests, using the inotifywait command (in Linux), to check if the configuration file was being overwritten when exiting or when starting NetBeans. It has turned out that it hasn't been overwritten in any of that cases. The Kotlin plug-in seems to apply the default colour settings on start, although the configuration file says the opposite.

Only when I've entered the settings panel again, and have changed a colour, the configuration file has been overwritten with the default values (except for that specific colour, of course). Then, the custom configuration has been lost.

Because I'm using my own colour profile, with its own name, I've decided to try with the default one, called NetBeans. Just in case. I've changed a colour for Kotlin and I've restarted. Surprisingly, the colour has been preserved :) .

So I believe that the plug-in ignores the syntax colouring when I use a profile different from NetBeans. Could you fix this, please? It's very annoying to have to change all these settings every time I restart NetBeans.

As a workaround, I'm going to backup the NetBeans colour profile and copy my settings there.

Thank you for your work!

negora commented 7 years ago

Right. In $HOME/.netbeans/8.2/config/Editors/ I've renamed all the directories called NetBeans to NetBeans.bak. And I've done the same with the ones belonging to my profile, from MyProfile to NetBeans. I've restarted NetBeans, and it has taken my colours from the start :) .

I hope that it's of help for other users ;) .