From 7c9f4475cea6228a9060468251d7d5ebc1aec819 Mon Sep 17 00:00:00 2001 From: jdormit Date: Sat, 10 Aug 2024 22:58:17 -0400 Subject: [PATCH] Add swift config --- emacs/.emacs.d/config/init-swift.el | 10 ++++++++++ emacs/.emacs.d/init.el | 1 + 2 files changed, 11 insertions(+) create mode 100644 emacs/.emacs.d/config/init-swift.el diff --git a/emacs/.emacs.d/config/init-swift.el b/emacs/.emacs.d/config/init-swift.el new file mode 100644 index 0000000..e72a9dc --- /dev/null +++ b/emacs/.emacs.d/config/init-swift.el @@ -0,0 +1,10 @@ +;; -*- lexical-binding: t; -*- + +(use-package swift-mode + :mode "\\.swift\\'" + :config + (with-eval-after-load 'eglot + (add-to-list 'eglot-server-programs '(swift-mode . ("sourcekit-lsp"))) + (add-hook 'swift-mode-hook 'eglot-ensure))) + +(provide 'init-swift) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index c1b9657..6a457d2 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -103,6 +103,7 @@ (require 'init-js) (require 'init-ruby) (require 'init-rust) +(require 'init-swift) (require 'init-web) (require 'init-markdown) (require 'init-astro)