Skip to content

isamert/jsdoc.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsdoc.el

https://melpa.org/packages/jsdoc-badge.svg

This package provides an easy way to insert JSDoc function comments and typedefs. It leverages a variety of techniques to generate documentation as much as possible without human interaction, including type inference and other similar approaches.

Also has basic TypeScript support, using TSDoc style.

./jsdoc.gif

Please note that this package is only compatible with Emacs 29 or newer versions that support tree-sitter. If you are using Emacs 28 or an earlier version, please refer to the emacs-28-and-below branch, which utilizes the tree-sitter package.

Usage

To use this package, you can call the interactive command jsdoc. If your cursor is on a function definition, the command will insert a JSDoc-style function documentation comment. If your cursor is on a JavaScript object, the command will insert a JSDoc @typedef comment.

Installation

jsdoc is available through MELPA. If you have it set up already, just do M-x package-install jsdoc and you are good to go. Otherwise please see MELPA getting started page to learn how you can install packages through MELPA or see the following installation options.

Alternatively, you can use the straight or quelpa package managers in conjunction with use-package.

;; Using straight
(use-package jsdoc
  :straight (:host github :repo "isamert/jsdoc.el"))

;; Using quelpa
(use-package jsdoc
  :quelpa (jsdoc :fetcher github :repo "isamert/jsdoc.el"))

Similar packages

ananthakumaran/tide
The command tide-jsdoc-template inserts a JSDoc template for your function. It’s meant to be simple, no advanced stuff. It also requires tide-mode enabled (which runs tsserver).
mooz/js-doc
Another package in the spirit of this one. Seems to have quite advanced stuff but didn’t get it to work. Haven’t got updated for a while.

About

Insert JSDoc comments easily with Emacs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •