From 430ab990ccde22ff60117139abd52ee5fe9d9ba3 Mon Sep 17 00:00:00 2001 From: Deepu Mohan Puthrote Date: Sat, 24 Aug 2024 11:01:52 +0100 Subject: [PATCH] feat: add minimal support for groovy and gradle --- layers/+lang/groovy/init.el | 23 +++++++++++++++++++++++ layers/+tools/gradle/init.el | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 layers/+lang/groovy/init.el create mode 100644 layers/+tools/gradle/init.el diff --git a/layers/+lang/groovy/init.el b/layers/+lang/groovy/init.el new file mode 100644 index 0000000..5079dc9 --- /dev/null +++ b/layers/+lang/groovy/init.el @@ -0,0 +1,23 @@ +;; +tools/groovy/init.el --- Groovy Layer -*- lexical-binding: t; -*- + +(use-package groovy-mode + :mode "\\.gr\\(oovy\\|adle\\)$" + :general-config + (warmacs/set-local-leader-keys + :keymaps 'groovy-mode-map + "'" #'run-groovy + "s" '(:ignore t :wk "repl") + "sf" #'groovy-send-definition + "sr" #'groovy-send-region)) + +(use-package groovy-imports + :hook + (groovy-mode . groovy-imports-scan-file) + ;; :init + ;; (add-hook 'groovy-mode-hook 'groovy-imports-scan-file) + :general-config + (warmacs/set-local-leader-keys + :keymaps 'groovy-mode-map + "ri" #'groovy-imports-add-import-dwim)) + +(provide '+lang/groovy/init) diff --git a/layers/+tools/gradle/init.el b/layers/+tools/gradle/init.el new file mode 100644 index 0000000..535d5a7 --- /dev/null +++ b/layers/+tools/gradle/init.el @@ -0,0 +1,10 @@ +;; +tools/gradle/init.el --- Gradle Layer -*- lexical-binding: t; -*- + +(use-package gradle-mode + :general-config + (warmacs/set-local-leader-keys + :keymaps 'gradle-mode-map + "w" '(:ignore t :wk "workspace") + "wu" #'lsp-java-update-project-configuration)) + +(provide '+tools/gradle/init)