~willvaughn/.emacs.d

9c3aca176891ac8441e1f4465a62bb92e127acbd — William Vaughn 5 months ago dff80b0
add yaml mode, fix sql-connection-alist for sql-mode
3 files changed, 3 insertions(+), 3 deletions(-)

M lisp/wv-packages.el
M lisp/wv-sql.el
M local.sample.el
M lisp/wv-packages.el => lisp/wv-packages.el +1 -0
@@ 38,6 38,7 @@
(straight-use-package 'elfeed)
(straight-use-package 'youtube-dl)
(straight-use-package 'editorconfig)
(straight-use-package 'yaml-mode)
(straight-use-package 'paredit)
(straight-use-package 'rainbow-delimiters)
(straight-use-package 'clojure-mode)

M lisp/wv-sql.el => lisp/wv-sql.el +1 -2
@@ 1,11 1,10 @@
;;; lisp/wv-sql.el -*- lexical-binding: t; -*-
(defvar wv-sql/connection-alist '())

(defun wv-sql/connect (conn-name)
  "Like `sql-connect' but fixed so that `sql-product' and buffer name are set automatically.
CONN-NAME is the name of the connection in `sql-connection-alist'."
  (interactive (list (sql-read-connection "Connection: " nil '(nil))))
  (let ((sql-product (or (cadadr (assoc 'sql-product (cdr (assoc conn-name wv-sql/connection-alist))))
  (let ((sql-product (or (cadadr (assoc 'sql-product (cdr (assoc conn-name sql-connection-alist))))
                         sql-product)))
    (sql-connect conn-name conn-name)))


M local.sample.el => local.sample.el +1 -1
@@ 6,7 6,7 @@
      wv-org/gcal-email "..."
      wv-irc/chat-sr-ht-sasl-user "..."
      wv-irc/chat-sr-ht-token "..."
      wv-sql/connection-alist
      sql-connection-alist
      '((dev-metrics
         (sql-product 'postgres)
         (sql-port 5432)