From 766557dbde1fcc4ccfe5c52211baeaa512f460f9 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Thu, 6 Jan 2022 11:07:46 +0530 Subject: [PATCH] Create SQL hydra --- init.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/init.org b/init.org index 3fa9ee8..469253e 100644 --- a/init.org +++ b/init.org @@ -2218,6 +2218,8 @@ Don't try to check if there are files with a certain extension...it will lead to (my-org-hydra/body)) ((derived-mode-p 'sh-mode) (my-shell-hydra/body)) + ((derived-mode-p 'sql-mode) + (my-sql-hydra/body)) (t (contrapunctus-general-hydra/body)))) (define-key boon-command-map (kbd "m") #'my-dispatch-hydra) @@ -2237,6 +2239,20 @@ Don't try to check if there are files with a certain extension...it will lead to "Evaluate" ("b" org-babel-execute-src-block "source block")) #+END_SRC + +** sql +#+BEGIN_SRC emacs-lisp +(defhydra my-sql-eval-hydra (:color blue) + "Eval" + ("e" sql-send-paragraph "paragraph") + ("b" sql-send-buffer "buffer")) + +(my-defhydra my-sql-hydra (:color blue) + "SQL" + ("r" sql-sqlite "REPL") + ("e" my-sql-eval-hydra/body "eval")) +#+END_SRC + * eshell #+BEGIN_SRC emacs-lisp (use-package eshell