From c69a85c8030a5c2f3cd98b7b00f244a963447c59 Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:48:26 -0500 Subject: [PATCH 1/4] Add LSP support to Kotlin `lsp-mode` has built in support for Kotlin. This makes it automatically used if you use the `+lsp` flag. --- modules/lang/kotlin/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/lang/kotlin/config.el b/modules/lang/kotlin/config.el index 06a1588b8..a78cb85c6 100644 --- a/modules/lang/kotlin/config.el +++ b/modules/lang/kotlin/config.el @@ -1,5 +1,10 @@ ;;; lang/kotlin/config.el -*- lexical-binding: t; -*- +(use-package! kotlin-mode + :init + (when (featurep! +lsp) + (add-hook 'kotlin-mode-local-vars-hook #'lsp!))) + (after! kotlin-mode (set-docsets! 'kotlin-mode "Kotlin") From 591d8d8e56196af9a18c914c8e9dcc19eae2aa7b Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:52:58 -0500 Subject: [PATCH 2/4] Fix location of lsp hook in kotlin/config.el --- modules/lang/kotlin/config.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/lang/kotlin/config.el b/modules/lang/kotlin/config.el index a78cb85c6..fb26af8fc 100644 --- a/modules/lang/kotlin/config.el +++ b/modules/lang/kotlin/config.el @@ -1,11 +1,8 @@ ;;; lang/kotlin/config.el -*- lexical-binding: t; -*- -(use-package! kotlin-mode - :init - (when (featurep! +lsp) - (add-hook 'kotlin-mode-local-vars-hook #'lsp!))) - (after! kotlin-mode + (when (featurep! +lsp) + (add-hook 'kotlin-mode-local-vars-hook #'lsp!)) (set-docsets! 'kotlin-mode "Kotlin") (map! :map kotlin-mode-map From 3fb52110a4102ca61dcbf02f874392493d704125 Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:53:46 -0500 Subject: [PATCH 3/4] Add LSP check to kotlin/doctor.el --- modules/lang/kotlin/doctor.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lang/kotlin/doctor.el b/modules/lang/kotlin/doctor.el index 63eabc017..3e8451a82 100644 --- a/modules/lang/kotlin/doctor.el +++ b/modules/lang/kotlin/doctor.el @@ -2,3 +2,7 @@ (unless (executable-find "ktlint") (warn! "ktlint not found. flycheck-kotlin won't work.")) + +(assert! (or (not (featurep! +lsp)) + (featurep! :tools lsp)) + "This module requires (:tools lsp)") From 4337ce3a256a4805d57d57cab069ccdee145a46e Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:54:59 -0500 Subject: [PATCH 4/4] Add +lsp to kotlin in index.org --- docs/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.org b/docs/index.org index d51c59518..52e25ff7b 100644 --- a/docs/index.org +++ b/docs/index.org @@ -188,7 +188,7 @@ Modules that bring support for a language or group of languages to Emacs. + java =+meghanada +lsp= - TODO + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO -+ kotlin - TODO ++ kotlin =+lsp+= - TODO + [[file:../modules/lang/latex/README.org][latex]] - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO