LoginSignup
1
0

More than 3 years have passed since last update.

quickrun.elでKotlinを実行する

Last updated at Posted at 2020-04-17

2020年04月29日現在quickrun.elでKotlinも使えるようになったため、該当のバージョンにすればこちらの記事の設定は不要になります。メンテナの方々ありがとうございました。

KotlinのPlayground を使ってる時にEmacsで書いてサクッと実行を試したいと思い
quickrunでKotlin対応してないかを調べた結果、READMEに追加方法がありJavaを参考に書いた。

init.el
(quickrun-add-command "kotlin"
  '((:command . "kotlin")
    (:exec    . ("kotlinc %o %s" "%c %NKt %a"))
    (:remove  . ("%nKt.class"))
    (:tempfile . nil)
    (:description . "Compile Kotlin file and execute")
    )
  :mode 'kotlin-mode)

Playground自体は他の人と共有する時に便利なので引き続き使っていくけど、個人で試すだけであれば積極的に使っていく。

quickkotlin.gif

(参考)
https://github.com/syohex/emacs-quickrun
https://github.com/syohex/emacs-quickrun/blob/55bbe5d54b80206ea5a60bf2f58eb6368b2c8201/quickrun.el#L237

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0