commit
da39d2b004
5 changed files with 43 additions and 0 deletions
|
@ -103,6 +103,7 @@
|
||||||
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
;;latex ; writing papers in Emacs has never been so fun
|
;;latex ; writing papers in Emacs has never been so fun
|
||||||
;;ledger ; an accounting system in Emacs
|
;;ledger ; an accounting system in Emacs
|
||||||
;;lua ; one-based indices? one-based indices
|
;;lua ; one-based indices? one-based indices
|
||||||
|
|
15
modules/lang/kotlin/autoload.el
Normal file
15
modules/lang/kotlin/autoload.el
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
;;; lang/kotlin/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;autoload
|
||||||
|
(defun +kotlin-locate-gradlew-file ()
|
||||||
|
"Gradlew file location for this project."
|
||||||
|
(locate-dominating-file buffer-file-name "gradlew"))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +kotlin/run-gradlew (command)
|
||||||
|
"Run gradlew in this project."
|
||||||
|
(interactive "sCommand: ")
|
||||||
|
(let ((default-directory (+kotlin-locate-gradlew-file))
|
||||||
|
(compilation-read-command nil)
|
||||||
|
(compile-command (format "sh gradlew %s" command)))
|
||||||
|
(call-interactively #'compile)))
|
16
modules/lang/kotlin/config.el
Normal file
16
modules/lang/kotlin/config.el
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
;;; lang/kotlin/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(after! kotlin-mode
|
||||||
|
(set-docsets! 'kotlin-mode "Kotlin")
|
||||||
|
|
||||||
|
(map! :map kotlin-mode-map
|
||||||
|
:localleader
|
||||||
|
:prefix ("b" . "build")
|
||||||
|
:desc "gradlew assemble" "a" (λ! (+kotlin/run-gradlew "assemble"))
|
||||||
|
:desc "gradlew build" "b" (λ! (+kotlin/run-gradlew "build"))
|
||||||
|
:desc "gradlew test" "t" (λ! (+kotlin/run-gradlew "test"))))
|
||||||
|
|
||||||
|
(def-package! flycheck-kotlin
|
||||||
|
:when (featurep! :tools flycheck)
|
||||||
|
:after kotlin-mode
|
||||||
|
:config (add-hook 'kotlin-mode-hook #'flycheck-kotlin-setup))
|
4
modules/lang/kotlin/doctor.el
Normal file
4
modules/lang/kotlin/doctor.el
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
;;; lang/kotlin/doctor.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(unless (executable-find "ktlint")
|
||||||
|
(warn! "ktlint not found. flycheck-kotlin won't work."))
|
7
modules/lang/kotlin/packages.el
Normal file
7
modules/lang/kotlin/packages.el
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; lang/kotlin/packages.el
|
||||||
|
|
||||||
|
(package! kotlin-mode)
|
||||||
|
|
||||||
|
(when (featurep! :tools flycheck)
|
||||||
|
(package! flycheck-kotlin))
|
Loading…
Add table
Add a link
Reference in a new issue