shuzijun / leetcode-editor

Do Leetcode exercises in IDE, support leetcode.com and leetcode-cn.com, to meet the basic needs of doing exercises.Support theoretically: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
https://plugins.jetbrains.com/plugin/12132-leetcode-editor
Apache License 2.0
3.75k stars 404 forks source link

No color highlight #724

Open zeroarst opened 4 months ago

zeroarst commented 4 months ago

I have customized color scheme. It works fine on my project. But for leetcode Kotlin files, it does not apply those colors. Leetcode Kotlin file image

Project Kotlin file. image

Does anyone know how to fix that?

3maoyap commented 3 months ago

Hi, @zeroarst . I met the same problem. All I did to solve it is as follows:

  1. New a project only for leetcode;
  2. Open Setting -> LeetCode Plugin 2.1. Select Kotlin in CodeType; 2.2. Change the TempFilePath to your project, for me is F:\Projects\leetcode\src\main\kotlin\com\example; 2.3. Enable the Custom Template, and set the Code Template to what you like and comply with the kotlin project pattern, for me is
    
    ${question.content}
    package com.example.leetcode.editor.cn;
    fun main(){

} ${question.code}


3. Enjoy your coding time!😎