From 9c3d1951e3d125b9dadd348f6c1c46f26c4a3a24 Mon Sep 17 00:00:00 2001 From: Patrick Norton <36009535+PatrickNorton@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:08:36 -0800 Subject: [PATCH] fix(swift): don't load lsp-sourcekit with eglot The `use-package!` declaration for lsp-sourcekit in `config.el` did not match the `package!` declaration in `packages.el`: this resulted in `lsp-sourcekit` being loaded but never installed. The removal of this package also resulted in there no longer being a proper LSP client with eglot--this has also been fixed. --- modules/lang/swift/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/lang/swift/config.el b/modules/lang/swift/config.el index 8de47b3ce..5fc4d9888 100644 --- a/modules/lang/swift/config.el +++ b/modules/lang/swift/config.el @@ -4,7 +4,9 @@ (set-repl-handler! 'swift-mode #'run-swift) (when (modulep! +lsp) - (add-hook 'swift-mode-local-vars-hook #'lsp! 'append)) + (add-hook 'swift-mode-local-vars-hook #'lsp! 'append) + (when (modulep! :tools lsp +eglot) + (set-eglot-client! swift-mode 'swift-mode '("sourcekit-lsp")))) (when (modulep! +tree-sitter) (add-hook 'swift-mode-local-vars-hook #'tree-sitter! 'append))) @@ -25,7 +27,7 @@ (use-package! lsp-sourcekit - :when (modulep! +lsp) + :when (and (modulep! +lsp) (not (modulep! :tools lsp +eglot))) :after swift-mode :init (add-hook 'swift-mode-local-vars-hook #'lsp! 'append) :config