-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
How do you feel about adding support for appropriate makeprg
into this plugin?
Something like this should do:
:setlocal makeprg=java\ -cp\ .:/usr/local/Cellar/kotlin/1.3.10/libexec/lib/kotlin-stdlib.jar\ %:r:gs?^.?\\u&?Kt
(
%
filename
:r
remove extension
gs?^.?\\u&?
- capitalise first letter (hello - Hello) - same as in /^./\u&/gs
Kt
- add to the end
)
This will cover scripts without specified package:
:!java -cp .:/usr/local/Cellar/kotlin/1.3.10/libexec/lib/kotlin-stdlib.jar HelloKt
But sure this can be extended with something like :echo substitute(getline(1), ‘package ‘, ‘’, ‘’)
.
I'm not totally clear on how to get kotlin stdlib path. We can try to guess it or require user to set env variable to the kotlin install dir.
Metadata
Metadata
Assignees
Labels
No labels