Created
April 10, 2023 09:52
-
-
Save cpbotha/dd783bffd4d57e22dd714a702cf6ade4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(use-package webpaste | |
:ensure t | |
:bind (("C-c C-p C-b" . webpaste-paste-buffer) | |
("C-c C-p C-r" . webpaste-paste-region) | |
("C-c C-p C-p" . webpaste-paste-buffer-or-region)) | |
:config | |
;; we can't use github gists, because the creation API requires a token in the header | |
;; see https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#create-a-gist | |
;; and open PR: https://github.com/etu/webpaste.el/pull/57 | |
;; - dpaste.org fast, with (auto?) syntax highlighting, but dark mode | |
;; - django! https://github.com/DarrenOfficial/dpaste | |
;; - also uses cloudflare, which I like | |
;; - ix.io slower, but webpaste lang detection works (appends e.g. /python) | |
;; - paste.rs fast, but webpaste forgets to append .py to returned link -- I | |
;; could make it work, but would need a little work. solarized light euw | |
;; - bpa.st fastest, good colours, language built in. my favourite now. | |
;; - discovered coincidentally via #emacs after the ones above! | |
(setq webpaste-provider-priority '("bpa.st" "dpaste.org" "ix.io" "paste.rs" )) | |
;; fix emacs-lisp handling for bpa.st, add csharp | |
;; to see list of lexers access https://bpa.st/api/v1/lexer | |
(plist-put (cdr (assoc "bpa.st" webpaste-providers-alist)) | |
:lang-overrides '((emacs-lisp-mode . "emacs-lisp") | |
(csharp-mode . "csharp") | |
(csharp-ts-mode . "csharp")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment