KarimAziev / quicktype

Generate typescript interfaces in Emacs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quicktype

Emacs integration for quicktype.

./demo.gif

Requirements

  • Emacs >= 27.1
  • transient
  • quicktype

Installation

Firstly ensure that you have installed quicktype program.

npm i -g quicktype

Manual

Download the source code and put it wherever you like and add the directory to the load path:

(add-to-list 'load-path "/path/to/quicktype)

(require 'quicktype)

With use-package and straight

(use-package quicktype
  :straight (:repo "KarimAziev/quicktype"
                   :type git
                   :host github)
  :commands (quicktype))

Usage

M-x quicktype

Dispatch transient popup with available arguments and execute quicktype.

By default it will generate types from region or current buffer. You can also specify file, URL, or data directory (option --src).

Customization

quicktype-src-modes-alist

Alist of quicktype languages and modes.

quicktype-default-switches

Alist of default quicktype switches.

quicktype-lang-modes-alist

Alist of quicktype languages and modes.

quicktype-url-reader

url reader should three args - prompt, initial input and history.

About

Generate typescript interfaces in Emacs.

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%