From fb609704cb681734b99bafc13ab593f44175cfd0 Mon Sep 17 00:00:00 2001 From: Mikael Konradsson Date: Fri, 23 May 2025 09:09:22 +0200 Subject: [PATCH 1/3] Add configuration for Emacs built in LSP-server, eglot. Requires Emacs 29.x or later --- .DS_Store | Bin 0 -> 6148 bytes scripts/lsp-kotlin-emacs-eglot.el | 14 ++++++++++++++ ...lin-emacs.el => lsp-kotlin-emacs-lsp-mode.el} | 0 3 files changed, 14 insertions(+) create mode 100644 .DS_Store create mode 100644 scripts/lsp-kotlin-emacs-eglot.el rename scripts/{lsp-kotlin-emacs.el => lsp-kotlin-emacs-lsp-mode.el} (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..eba13223f6781b153af5c8a6f35630fbb0dc1cc4 GIT binary patch literal 6148 zcmeHKJ5EC}5S)cbM50NV(pTUHR+O9|7eFLUq)0(L=wHRTI2yB`g6NShDL}K*dhGR% zEl=_GEdX16?4N)IfH~a}pFT{@_uVIUR}mx9dB!W=G3EIA80CC1}80XPT z5Ss^xy>Luqgl0)4Ce^CNu%t8IDz6ugiAjf5^I>(fRfl46JI`;C4(o{;rGOMTSKvOE z3$Onh`i1`goTQZ$kOKco0h_J2>lL3=wRQ41ueFW-O!u5Gx*O*~;SlAR80DA?FUQMB b%Dm=t?)SnmG3bm3ov5Dy*F`1;ZmqyKRWud8 literal 0 HcmV?d00001 diff --git a/scripts/lsp-kotlin-emacs-eglot.el b/scripts/lsp-kotlin-emacs-eglot.el new file mode 100644 index 0000000..ea3f398 --- /dev/null +++ b/scripts/lsp-kotlin-emacs-eglot.el @@ -0,0 +1,14 @@ +(use-package eglot + :hook ((kotlin-mode kotlin-ts-mode) . (lambda () (eglot-ensure))) + :ensure nil ;; use built-in eglot + :custom + (eglot-autoshutdown t) + (eglot-extend-to-xref t) + (eglot-sync-connect 1) + (eglot-connect-timeout 60) + (eglot-report-progress nil) + (eglot-events-buffer-size 0) + (eglot-events-buffer-config '(size: 0 :format full)) + :config + (add-to-list 'eglot-server-programs + '((kotlin-ts-mode kotlin-mode) . ("bash" "PATH-TO-KOTLIN-LSP/kotlin-lsp.sh" "--stdio")))) diff --git a/scripts/lsp-kotlin-emacs.el b/scripts/lsp-kotlin-emacs-lsp-mode.el similarity index 100% rename from scripts/lsp-kotlin-emacs.el rename to scripts/lsp-kotlin-emacs-lsp-mode.el From c96eb91fd5998f78c2ac214bb8da73538161f6ac Mon Sep 17 00:00:00 2001 From: Mikael Konradsson Date: Fri, 23 May 2025 09:12:15 +0200 Subject: [PATCH 2/3] Removed ds-store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index eba13223f6781b153af5c8a6f35630fbb0dc1cc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ5EC}5S)cbM50NV(pTUHR+O9|7eFLUq)0(L=wHRTI2yB`g6NShDL}K*dhGR% zEl=_GEdX16?4N)IfH~a}pFT{@_uVIUR}mx9dB!W=G3EIA80CC1}80XPT z5Ss^xy>Luqgl0)4Ce^CNu%t8IDz6ugiAjf5^I>(fRfl46JI`;C4(o{;rGOMTSKvOE z3$Onh`i1`goTQZ$kOKco0h_J2>lL3=wRQ41ueFW-O!u5Gx*O*~;SlAR80DA?FUQMB b%Dm=t?)SnmG3bm3ov5Dy*F`1;ZmqyKRWud8 From 807181b56e4c84b4713b7f1c2347d0c1d955e210 Mon Sep 17 00:00:00 2001 From: Mikael Konradsson Date: Fri, 23 May 2025 09:13:34 +0200 Subject: [PATCH 3/3] Simplyfied example a bit and removed .ds_store --- scripts/lsp-kotlin-emacs-eglot.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/lsp-kotlin-emacs-eglot.el b/scripts/lsp-kotlin-emacs-eglot.el index ea3f398..a0031a7 100644 --- a/scripts/lsp-kotlin-emacs-eglot.el +++ b/scripts/lsp-kotlin-emacs-eglot.el @@ -1,14 +1,12 @@ (use-package eglot :hook ((kotlin-mode kotlin-ts-mode) . (lambda () (eglot-ensure))) - :ensure nil ;; use built-in eglot + :ensure nil ;; use built-in eglot Emacs 29. or later :custom (eglot-autoshutdown t) (eglot-extend-to-xref t) (eglot-sync-connect 1) (eglot-connect-timeout 60) - (eglot-report-progress nil) - (eglot-events-buffer-size 0) - (eglot-events-buffer-config '(size: 0 :format full)) + (eglot-report-progress t) :config (add-to-list 'eglot-server-programs '((kotlin-ts-mode kotlin-mode) . ("bash" "PATH-TO-KOTLIN-LSP/kotlin-lsp.sh" "--stdio"))))