yeet
This commit is contained in:
33
.config/emacs/modules/lang/swift/config.el
Normal file
33
.config/emacs/modules/lang/swift/config.el
Normal file
@@ -0,0 +1,33 @@
|
||||
;;; lang/swift/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! swift-mode
|
||||
(set-repl-handler! 'swift-mode #'run-swift))
|
||||
|
||||
|
||||
(use-package! flycheck-swift
|
||||
:when (featurep! :checkers syntax)
|
||||
:unless (featurep! +lsp)
|
||||
:after swift-mode
|
||||
:config (flycheck-swift-setup))
|
||||
|
||||
|
||||
(use-package! company-sourcekit
|
||||
:when (featurep! :completion company)
|
||||
:unless (featurep! +lsp)
|
||||
:after swift-mode
|
||||
:config
|
||||
(set-company-backend! 'swift-mode '(company-sourcekit company-yasnippet)))
|
||||
|
||||
|
||||
(use-package! lsp-sourcekit
|
||||
:when (featurep! +lsp)
|
||||
:after swift-mode
|
||||
:init (add-hook 'swift-mode-local-vars-hook #'lsp!)
|
||||
:config
|
||||
(setq lsp-sourcekit-executable
|
||||
(cl-find-if #'executable-find
|
||||
(list lsp-sourcekit-executable ; 'sourcekit-lsp' by default
|
||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp"
|
||||
"sourcekit"
|
||||
"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/sourcekit-lsp"
|
||||
"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/sourcekit"))))
|
||||
11
.config/emacs/modules/lang/swift/packages.el
Normal file
11
.config/emacs/modules/lang/swift/packages.el
Normal file
@@ -0,0 +1,11 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/swift/packages.el
|
||||
|
||||
(package! swift-mode :pin "800efe2910e0a8517ac720c8bd0e0714fef142eb")
|
||||
|
||||
(if (featurep! +lsp)
|
||||
(package! lsp-sourcekit :pin "97ff36b228a61e69734c7180f33cc6951b1a600f")
|
||||
(when (featurep! :completion company)
|
||||
(package! company-sourcekit :pin "a1860ad4dd3a542acd2fa0dfac2a388cbdf4af0c"))
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-swift :pin "4c5ad401252400a78da395fd56a71e67ff8c2761")))
|
||||
Reference in New Issue
Block a user