diff options
| author | benj <benj@rse8.com> | 2021-07-18 13:38:07 -0700 |
|---|---|---|
| committer | benj <benj@rse8.com> | 2021-07-18 13:38:07 -0700 |
| commit | e9b16c36ee6f3c77d6b1c303826804f2e047d21c (patch) | |
| tree | 71f532f098b791f55f2e04250f384dd2a8bafd6e | |
| parent | 22a17ec900b919a1a648c61461dc8f4786af212a (diff) | |
| download | emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.tar emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.tar.gz emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.tar.bz2 emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.tar.lz emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.tar.xz emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.tar.zst emacs-e9b16c36ee6f3c77d6b1c303826804f2e047d21c.zip | |
- yasnippet for quick plpgsql functions
- fallback font for emoji support
| -rw-r--r-- | settings/setup-custom.el | 11 | ||||
| -rw-r--r-- | templates/snippets/sql-mode/primitive-return-function | 13 | ||||
| -rw-r--r-- | templates/snippets/sql-mode/record-return-fuction | 18 |
3 files changed, 33 insertions, 9 deletions
diff --git a/settings/setup-custom.el b/settings/setup-custom.el index 73c6b71..3cc694d 100644 --- a/settings/setup-custom.el +++ b/settings/setup-custom.el @@ -1,13 +1,6 @@ ;;; setup-custom.el --- non-user specific customizations -*- lexical-binding: t; -*- - -(set-frame-font "Source Code Pro Medium" nil t) - -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(default ((t (:height 90 :width normal :family "Source Code Pro Medium"))))) +(set-face-attribute 'default nil :font "Source Code Pro Medium-9") +(set-fontset-font t nil "JoyPixels" nil 'append) ;; no line highlight (hl-line-mode 0) diff --git a/templates/snippets/sql-mode/primitive-return-function b/templates/snippets/sql-mode/primitive-return-function new file mode 100644 index 0000000..bb7e79e --- /dev/null +++ b/templates/snippets/sql-mode/primitive-return-function @@ -0,0 +1,13 @@ +# key: fnp +# name: Create function with primitive return value. +# -- +drop function if exists $1(); +create or replace function $1( + $0 +) +returns $2 as $$ +declare +begin + +end; +$$ language plpgsql;
\ No newline at end of file diff --git a/templates/snippets/sql-mode/record-return-fuction b/templates/snippets/sql-mode/record-return-fuction new file mode 100644 index 0000000..a3894c4 --- /dev/null +++ b/templates/snippets/sql-mode/record-return-fuction @@ -0,0 +1,18 @@ +# key: fn +# name: create a function which returns a full record +# -- +drop type if exists $1_ret cascade; +create type $1_ret as ( + $2 +); + +drop function if exists $1(); +create or replace function $1( + $3 +) +returns setof $1_ret as $$ +declare +begin + $0 +end; +$$ language plpgsql; |
