A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/heavenshell/vim-jsdoc.git below:

heavenshell/vim-jsdoc: Generate JSDoc to your JavaScript code.

jsdoc.vim generates JSDoc block comments based on a function signature.

jsdoc.vim supports Vim8.

Neovim works since v2.1.0, but if something wrong, send me pull requests to fix it.

If you want use old version checkout 1.0.0.

Node v12.x or above.

Plug 'heavenshell/vim-jsdoc', {
  \ 'for': ['javascript', 'javascript.jsx','typescript'],
  \ 'do': 'make install'
\}
PlugUpdate error

If you got `yarn.lock` related error,

error: Your local changes to the following files would be overwritten by merge:
    lib/yarn.lock

Run following command

cd /path/to/plugged/vim-jsdoc
git checkout -- yarn.lock

and re-run PlugUpdate

Since version 2.0.0, jsdoc.vim requires a local copy lehre installed to the plugin directory.

You can install lehre with:

# cd to <vim-jsdoc path>
make install

If you want to update lehre use:

If you want to install lehre manually, you can install from npm.

Set installed /path/to/node_modules/.bin/lehre path to g:jsdoc_lehre_path.

# cd to <vim-jsdoc path>/lib
npm install

If you want to set the path of lehre manually on Windows, you should use the path with the file extension .cmd, such as /path/to/node_modules/.bin/lehre.cmd.

  1. Move cursor on function keyword line
  2. Type :JsDoc to insert JSDoc
  3. Insert JSDoc above the function keyword line
  1. Type :JsDocFormat
  2. Insert JSDoc above the all signatures
Option Default Description g:jsdoc_templates_path '' Path to custom template. g:jsdoc_formatter 'jsdoc' Document block formatter, jsdoc, esdoc, tsdoc g:jsdoc_lehre_path './lib/lehre' Path to lehre.

You can choose formatter from JsDoc, ESDoc, TSDoc.

If you want to create your own template, see example template.

Since ver 2.0.0 input Allow prompt for interactive input is deprecated.

If you want input Interactively, use snippet plugin.

See snippet example template.

You can add following setting to .vimrc

nmap <silent> <C-l> <Plug>(jsdoc)

Alternatively, you could add the following setting to your .vimrc to search for the last function declaration and puts your jsdoc above it:

nmap <silent> <C-l> ?function<cr>:noh<cr><Plug>(jsdoc)

New BSD LICENSE


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4