Move mac/ios config to module-apple.el

This commit is contained in:
Henrik Lissner 2016-01-29 07:03:43 -05:00
parent a0ee7a0a5c
commit 503a019bab
3 changed files with 34 additions and 18 deletions

View File

@ -42,8 +42,6 @@
;; OSX Related Plugins ;;;;;;;;;;;;;;;;;
(use-package applescript-mode :mode "\\.applescript$")
(use-package dash-at-point
:commands (dash-at-point dash-at-point-with-docset)
:config

34
modules/module-apple.el Normal file
View File

@ -0,0 +1,34 @@
;;; module-apple.el
(use-package applescript-mode :mode "\\.applescript$")
;; TODO Set up emacs task runners for fruitstrap
(use-package swift-mode
:mode "\\.swift$"
:init
(add-hook! swift-mode 'flycheck-mode)
:config
(after! flycheck (add-to-list 'flycheck-checkers 'swift))
(after! company
(require 'company-sourcekit)
(define-company-backend! swift-mode (sourcekit yasnippet))))
(defun narf-lb6-reload ()
(interactive)
(let ((dir (f-traverse-upwards (lambda (f) (string-suffix-p ".lbaction" f)))))
(shell-command (format "open %s" dir))))
(define-minor-mode lb6-mode
"Launchbar development mode."
:init-value nil
:lighter " lb6"
:keymap (let ((map (make-sparse-keymap)))
(map! :map map
(:localleader
:n "b" 'narf-lb6-reload))
map)
(add-yas-minor-mode! 'lb6-mode))
(associate! lb6-mode :match "\\.lb\\(action\\|ext\\)/.+$")
(provide 'module-apple)
;;; module-apple.el ends here

View File

@ -1,16 +0,0 @@
;;; module-swift.el
(use-package swift-mode
:mode "\\.swift$"
:init
(add-hook! swift-mode 'flycheck-mode)
:config
(after! flycheck (add-to-list 'flycheck-checkers 'swift))
(after! company
(require 'company-sourcekit)
(define-company-backend! swift-mode (sourcekit yasnippet))))
;; TODO Set up emacs task runners for fruitstrap
(provide 'module-swift)
;;; module-swift.el ends here