1
0
Fork 0

fix(emacs): add swift

This commit is contained in:
Lucas Sta Maria 2025-10-15 22:29:38 -05:00
parent bccdcc849d
commit 7ef2b08272
Signed by: lucas
GPG key ID: F07FB16A826E3B47
2 changed files with 7 additions and 2 deletions

View file

@ -120,6 +120,10 @@
(use-package auctex :straight t)
(use-package cdlatex :straight t)
(use-package yaml-mode :straight t)
(use-package swift-mode :straight t
:custom-face (swift-mode:keyword-face ((t (:inherit nano-strong))))
:hook ((swift-mode . electric-pair-local-mode)
(swift-mode . electric-indent-local-mode)))
;; From https://www.ovistoica.com/blog/2024-7-05-modern-emacs-typescript-web-tsx-config
(use-package treesit

View file

@ -7,7 +7,7 @@
:custom
(eglot-events-buffer-config '(:size 0 :format full))
:custom-face (eglot-inlay-hint-face ((t (:height 1.0))))
:hook ((racket-mode rust-mode irony-mode tuareg-mode python-mode tsx-ts-mode nix-mode) . eglot-ensure)
:hook ((racket-mode rust-mode irony-mode tuareg-mode python-mode tsx-ts-mode nix-mode swift-mode) . eglot-ensure)
:bind (:map eglot-mode-map
("C-c l r" . eglot-rename)
("C-c l a" . eglot-code-actions)
@ -16,7 +16,8 @@
(fset #'jsonrpc--log-event #'ignore)
:config
(add-to-list 'eglot-server-programs '(nix-mode "nil"))
(add-to-list 'eglot-server-programs '(python-mode . ("basedpyright-langserver" "--stdio"))))
(add-to-list 'eglot-server-programs '(python-mode . ("basedpyright-langserver" "--stdio")))
(add-to-list 'eglot-server-programs '(swift-mode "sourcekit-lsp")))
(use-package eglot-booster
:straight (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster")
:after (eglot)