-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also use sql-upcase mode to auto-upcase sql keywords and functions. Makes life easy especially since I have mapped by caps to control and hence have to hold down shift to type upcase letters which is a pain.
- Loading branch information
1 parent
f7cbf05
commit 574ec04
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
;; Capitalize keywords in SQL mode | ||
(add-hook 'sql-mode-hook 'sqlup-mode) | ||
;; Capitalize keywords in an interactive session (e.g. psql) | ||
(add-hook 'sql-interactive-mode-hook 'sqlup-mode) | ||
|
||
; Mode to upcase SQL keyword and functions | ||
(use-package sqlup-mode | ||
:config | ||
;; Blacklist some words - prevent them from auto-upcase | ||
;; (eg. most commonly used `name` as column-name) | ||
(add-to-list 'sqlup-blacklist "name")) | ||
|
||
(diminish 'sql-mode "sql") | ||
|
||
(provide 'sql-config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters