Customize sql-mode, adding sqlformat package

This commit is contained in:
2018-12-20 00:52:58 +00:00
parent d4558abc3f
commit d77b98c35b
3 changed files with 33 additions and 1 deletions

View File

@@ -132,6 +132,7 @@
(require 'siren-scss)
(require 'siren-sh)
(require 'siren-slim)
(require 'siren-sql)
(require 'siren-text-mode)
(require 'siren-thrift)
(require 'siren-typescript)

View File

@@ -7,7 +7,7 @@
'(magit-commit-arguments (quote ("-S")))
'(package-selected-packages
(quote
(zoom-window yasnippet-snippets yari yaml-mode which-key web-mode use-package typescript-mode toggle-quotes tide thrift string-inflection smex smartparens smart-mode-line slim-mode seeing-is-believing scss-mode sass-mode rust-playground ruby-tools ruby-refactor ruby-compilation rubocopfmt rubocop rspec-mode robe rjsx-mode restart-emacs resize-window realgud-byebug rainbow-mode racer prettier-js plantuml-mode php-mode phi-search neotree nav multiple-cursors move-dup magit-gh-pulls lua-mode lsp-mode linum-relative json-mode imenu-anywhere ido-vertical-mode ido-completing-read+ hlinum highlight-symbol highlight-indentation highlight-indent-guides helpful helm-swoop helm-projectile helm-open-github helm-gtags helm-describe-modes helm-descbinds helm-ag go-projectile go-playground go-dlv gitignore-mode github-browse-file gitconfig-mode git-timemachine git-link full-ack flycheck-rust flycheck-gometalinter fill-column-indicator feature-mode expand-region exec-path-from-shell evil eslintd-fix editorconfig dumb-jump doom-themes dockerfile-mode direx diminish diff-hl dash-at-point company-lsp company-go coffee-mode cargo buffer-move browse-kill-ring anzu ace-window))))
(zoom-window yasnippet-snippets yari yaml-mode which-key web-mode use-package typescript-mode toggle-quotes tide thrift string-inflection sqlformat smex smartparens smart-mode-line slim-mode seeing-is-believing scss-mode sass-mode rust-playground ruby-tools ruby-refactor ruby-compilation rubocopfmt rubocop rspec-mode robe rjsx-mode restart-emacs resize-window realgud-byebug rainbow-mode racer prettier-js plantuml-mode php-mode phi-search neotree nav multiple-cursors move-dup magit-gh-pulls lua-mode lsp-mode linum-relative json-mode imenu-anywhere ido-vertical-mode ido-completing-read+ hlinum highlight-symbol highlight-indentation highlight-indent-guides helpful helm-swoop helm-projectile helm-open-github helm-gtags helm-describe-modes helm-descbinds helm-ag go-projectile go-playground go-dlv gitignore-mode github-browse-file gitconfig-mode git-timemachine git-link full-ack flycheck-rust flycheck-gometalinter fill-column-indicator feature-mode expand-region exec-path-from-shell evil eslintd-fix editorconfig dumb-jump doom-themes dockerfile-mode direx diminish diff-hl dash-at-point company-lsp company-go coffee-mode cargo buffer-move browse-kill-ring anzu ace-window))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

View File

@@ -0,0 +1,31 @@
;;; siren-sql.el --- jimeh's Emacs Siren: sql-mode configuration.
;;; Commentary:
;; Basic configuration for sql-mode.
;;; Code:
(require 'siren-rainbow)
(use-package sql-mode
:ensure nil ;; loaded from emacs built-ins
:mode "\\.sql\\'"
:hook (sql-mode . siren-sql-mode-setup)
:init
(defun siren-sql-mode-setup ()
(setq tab-width 2)
(company-mode +1)
(highlight-indentation-current-column-mode +1)))
(use-package sqlformat
:hook
(sql-mode . sqlformat-mode)
:config
(setq sqlformat-command 'pgformatter))
(provide 'siren-sql)
;;; siren-sql.el ends here