mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Since we enable global-company-mode, explicitly enabling it in the setup for various major modes does nothing. But it does tie the code to company mode, making it harder to try alternatives like corfu.
40 lines
724 B
EmacsLisp
40 lines
724 B
EmacsLisp
;;; siren-sql.el --- jimeh's Emacs Siren: sql-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for sql-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-rainbow)
|
|
|
|
(use-package sql-mode
|
|
:straight (:type built-in)
|
|
:mode "\\.sql\\'"
|
|
:hook (sql-mode . siren-sql-mode-setup)
|
|
|
|
:init
|
|
(defun siren-sql-mode-setup ()
|
|
(setq tab-width 2)))
|
|
|
|
(use-package lsp-sqls
|
|
:straight lsp-mode
|
|
|
|
:hook
|
|
(sql-mode . lsp-deferred)
|
|
|
|
:custom
|
|
(lsp-sqls-connections
|
|
'(((driver . "mysql") (dataSourceName . "root@tcp(localhost:3306)/")))))
|
|
|
|
(use-package sqlformat
|
|
:hook
|
|
(sql-mode . sqlformat-on-save-mode)
|
|
|
|
:custom
|
|
(sqlformat-args '("-g"))
|
|
(sqlformat-command 'pgformatter))
|
|
|
|
(provide 'siren-sql)
|
|
;;; siren-sql.el ends here
|