fix(swift): set-eglot-client!: extra argument

And move setter out of condition (it will no-op if :tools lsp +eglot
isn't enabled). Plus, it should be configured even when +lsp isn't
enabled for :lang swift.

Amend: #7567
Close: #7577
Co-authored-by: ncihnegn <ncihnegn@users.noreply.github.com>
This commit is contained in:
Henrik Lissner 2023-12-02 10:48:42 -05:00
parent a89d4b7df5
commit c7ddbe049f
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -2,11 +2,10 @@
(after! swift-mode
(set-repl-handler! 'swift-mode #'run-swift)
(set-eglot-client! 'swift-mode '("sourcekit-lsp"))
(when (modulep! +lsp)
(add-hook 'swift-mode-local-vars-hook #'lsp! 'append)
(when (modulep! :tools lsp +eglot)
(set-eglot-client! swift-mode 'swift-mode '("sourcekit-lsp"))))
(add-hook 'swift-mode-local-vars-hook #'lsp! 'append))
(when (modulep! +tree-sitter)
(add-hook 'swift-mode-local-vars-hook #'tree-sitter! 'append)))