webpaste.el icon indicating copy to clipboard operation
webpaste.el copied to clipboard

Language detection with bpa.st

Open dennissherb opened this issue 2 years ago • 1 comments

Language detection doesn't work with bpa.st. I tried this with C# and emacs-lisp, both cases fail to get detected and get pasted as plain text.

dennissherb avatar May 06 '22 18:05 dennissherb

You can work around that the following in your init:

  ;; 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")))

cpbotha avatar Apr 10 '23 09:04 cpbotha