rm module-apple, add module-{db,swift}, disable module-org, update init.el
This commit is contained in:
parent
8bdb4d71d6
commit
1db2ccf504
4 changed files with 72 additions and 43 deletions
20
init.el
20
init.el
|
@ -45,14 +45,15 @@
|
||||||
(IS-WINDOWS 'core-os-win32))
|
(IS-WINDOWS 'core-os-win32))
|
||||||
|
|
||||||
;; The heart of DOOM
|
;; The heart of DOOM
|
||||||
|
core-scratch ; a perdier scratch buffer
|
||||||
core-ui ; draw me like one of your French editors
|
core-ui ; draw me like one of your French editors
|
||||||
core-evil ; come to the dark side, we have cookies
|
core-evil ; come to the dark side, we have cookies
|
||||||
core-editor ; filling the editor-shaped hole in the emacs OS
|
core-editor ; filling the editor-shaped hole in the emacs OS
|
||||||
core-company ; for the lazy typist
|
core-company ; auto-completion, for the lazy typist
|
||||||
core-yasnippet ; for the lazier typist
|
core-yasnippet ; snippets, for the lazier typist
|
||||||
core-autoinsert ; for the laziest typist
|
core-autoinsert ; file templates, for the laziest typist
|
||||||
core-flycheck ; get tazed for every semicolon you forget
|
core-flycheck ; get tazed for every semicolon you forget
|
||||||
core-project ; whose project am I in?
|
core-project ; for project navigation aficionados
|
||||||
core-vcs ; remember remember, that commit in November
|
core-vcs ; remember remember, that commit in November
|
||||||
core-helm ; a search engine for life and love
|
core-helm ; a search engine for life and love
|
||||||
core-workgroups ; cure Emacs alzheimers + tab emulation
|
core-workgroups ; cure Emacs alzheimers + tab emulation
|
||||||
|
@ -60,12 +61,12 @@
|
||||||
core-popup ; taming sudden and inevitable windows
|
core-popup ; taming sudden and inevitable windows
|
||||||
|
|
||||||
;; Environments
|
;; Environments
|
||||||
module-apple ; Applescript, Swift, Launchbar & other wallet syphons
|
|
||||||
module-cc ; C/C++/Obj-C madness
|
module-cc ; C/C++/Obj-C madness
|
||||||
module-crystal ; ruby at the speed of c
|
module-crystal ; ruby at the speed of c
|
||||||
module-csharp ; unity, .NET, and mono shenanigans
|
module-csharp ; unity, .NET, and mono shenanigans
|
||||||
module-css ; #big-bang::before { content: ""; }
|
module-css ; #big-bang::before { content: ""; }
|
||||||
module-data ; config and data formats
|
module-data ; config/data formats
|
||||||
|
module-db ; using emacs as a db browser/client
|
||||||
module-go ; the hipster dialect
|
module-go ; the hipster dialect
|
||||||
module-haskell ; a language that's lazier than I am
|
module-haskell ; a language that's lazier than I am
|
||||||
module-java ; the poster child for carpal tunnel syndrome
|
module-java ; the poster child for carpal tunnel syndrome
|
||||||
|
@ -74,7 +75,6 @@
|
||||||
module-latex ; for writing papers in Emacs
|
module-latex ; for writing papers in Emacs
|
||||||
module-lisp ; drowning in parentheses
|
module-lisp ; drowning in parentheses
|
||||||
module-lua ; one-based indices? one-based indices.
|
module-lua ; one-based indices? one-based indices.
|
||||||
module-org ; for organized fearless leader
|
|
||||||
module-php ; making php less painful to work with
|
module-php ; making php less painful to work with
|
||||||
module-processing ; pretty prototypes
|
module-processing ; pretty prototypes
|
||||||
module-python ; beautiful is better than ugly
|
module-python ; beautiful is better than ugly
|
||||||
|
@ -82,11 +82,13 @@
|
||||||
module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
module-scala ; Java, but good
|
module-scala ; Java, but good
|
||||||
module-sh ; she sells Z-shells by the C XOR
|
module-sh ; she sells Z-shells by the C XOR
|
||||||
|
module-swift ; I wanted emoji variables. I got them
|
||||||
module-text ; writing docs for people to ignore
|
module-text ; writing docs for people to ignore
|
||||||
module-web ; The end is always near </html>
|
module-web ; The end is always near </html>
|
||||||
|
|
||||||
;; Experimental
|
;; Experimental
|
||||||
;;module-eshell ; for inferior OSes *cough*windows
|
;;module-eshell ; for inferior OSes *cough*windows
|
||||||
|
;;module-org ; for organized fearless leader
|
||||||
|
|
||||||
;; Extra libraries
|
;; Extra libraries
|
||||||
extra-demo ; allow me to demonstrate...
|
extra-demo ; allow me to demonstrate...
|
||||||
|
@ -98,5 +100,3 @@
|
||||||
my-commands
|
my-commands
|
||||||
my-bindings
|
my-bindings
|
||||||
))
|
))
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
;;; module-apple.el
|
|
||||||
|
|
||||||
(use-package applescript-mode :mode "\\.applescript$")
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;; LaunchBar: https://www.obdev.at/products/launchbar
|
|
||||||
;;
|
|
||||||
|
|
||||||
(def-project-type! lb6 "lb6"
|
|
||||||
:match "\\.lb\\(action\\|ext\\)/.+$"
|
|
||||||
:build (lambda ()
|
|
||||||
(awhen (f-traverse-upwards (lambda (f) (f-ext? f "lbaction")))
|
|
||||||
(shell-command (format "open '%s'" it)))))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;; Swift
|
|
||||||
;;
|
|
||||||
|
|
||||||
;; TODO Set up emacs task runners for fruitstrap
|
|
||||||
(use-package swift-mode
|
|
||||||
:mode "\\.swift$"
|
|
||||||
:init (add-hook 'swift-mode-hook 'flycheck-mode)
|
|
||||||
:config
|
|
||||||
(def-company-backend! swift-mode (sourcekit yasnippet))
|
|
||||||
(after! flycheck (push 'swift flycheck-checkers)))
|
|
||||||
|
|
||||||
(use-package company-sourcekit
|
|
||||||
:after swift-mode)
|
|
||||||
|
|
||||||
(provide 'module-apple)
|
|
||||||
;;; module-apple.el ends here
|
|
46
modules/module-db.el
Normal file
46
modules/module-db.el
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
;;; module-db.el
|
||||||
|
|
||||||
|
(use-package sql-mode
|
||||||
|
:mode "\\.sql$"
|
||||||
|
:config
|
||||||
|
(evil-set-initial-state 'sql-interactive-mode 'emacs)
|
||||||
|
(push 'sql-interactive-mode doom-popup-protect-modes)
|
||||||
|
;; For my local development environment
|
||||||
|
(setq sql-pop-to-buffer-after-send-region nil
|
||||||
|
sql-server "docker.dev"
|
||||||
|
sql-user "root"
|
||||||
|
sql-password ""))
|
||||||
|
|
||||||
|
(defvar db-commands
|
||||||
|
'((mysql
|
||||||
|
(:listdb )
|
||||||
|
)))
|
||||||
|
|
||||||
|
(evil-define-command doom:db-select (product)
|
||||||
|
(interactive "<a>")
|
||||||
|
(sql-set-product (intern product))
|
||||||
|
(message "sql-product set to %s" product))
|
||||||
|
|
||||||
|
(evil-define-operator doom:db (beg end &optional bang product)
|
||||||
|
"Open a db connection, reopen an old one, or send the selected region to the
|
||||||
|
open comint."
|
||||||
|
:type inclusive
|
||||||
|
(interactive "<r><!><a>")
|
||||||
|
(let ((sql-buf (get-buffer sql-buffer)))
|
||||||
|
(when (and bang sql-buf)
|
||||||
|
(message "Restarting connection")
|
||||||
|
(kill-buffer sql-buf))
|
||||||
|
(if sql-buf
|
||||||
|
(if (or (get-buffer-window sql-buf)
|
||||||
|
(evil-visual-state-p))
|
||||||
|
(sql-send-region beg end)
|
||||||
|
(doom/popup-buffer sql-buf))
|
||||||
|
(let ((product (if product (intern product) sql-product)))
|
||||||
|
(unless product
|
||||||
|
(user-error "No SQL product is set"))
|
||||||
|
(sql-set-product product)
|
||||||
|
(sql-product-interactive product 0)
|
||||||
|
(message "Started new %s connection" product)))))
|
||||||
|
|
||||||
|
(provide 'module-db)
|
||||||
|
;;; module-db.el ends here
|
16
modules/module-swift.el
Normal file
16
modules/module-swift.el
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
;;; module-swift.el
|
||||||
|
|
||||||
|
;; TODO Set up emacs task runners for fruitstrap
|
||||||
|
(use-package swift-mode
|
||||||
|
:mode "\\.swift$"
|
||||||
|
:init (add-hook 'swift-mode-hook 'flycheck-mode)
|
||||||
|
:config
|
||||||
|
(def-company-backend! swift-mode (sourcekit yasnippet))
|
||||||
|
(def-repl! swift-mode swift-mode-run-repl)
|
||||||
|
(after! flycheck (push 'swift flycheck-checkers)))
|
||||||
|
|
||||||
|
(use-package company-sourcekit
|
||||||
|
:after swift-mode)
|
||||||
|
|
||||||
|
(provide 'module-swift)
|
||||||
|
;;; module-swift.el ends here
|
Loading…
Add table
Add a link
Reference in a new issue