Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix document #114

Merged
merged 1 commit into from
Aug 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ Neovim works since v2.1.0, but if something wrong, send me pull requests to fix

If you want use old version checkout [1.0.0](https://github.com/heavenshell/vim-jsdoc/releases/tag/1.0.0>).

## Requirements

Node v12.x or above.

## Install

### Vim Plug

```
Plug 'heavenshell/vim-jsdoc', {
\ 'for': ['javascript', 'javascript.jsx','typescript'],
Plug 'heavenshell/vim-jsdoc', {
\ 'for': ['javascript', 'javascript.jsx','typescript'],
\ 'do': 'make install'
\}
```
Expand Down Expand Up @@ -94,7 +98,7 @@ Option |Default |Description

You can choose formatter from [JsDoc](https://jsdoc.app/), [ESDoc](https://esdoc.org/), [TSDoc](https://github.com/microsoft/tsdoc).

If you want to create your own template, see [example template](https://github.com/heavenshell/ts-lehre/tree/master/examples).
If you want to create your own template, see [example template](https://github.com/heavenshell/ts-lehre/tree/master/examples).

## Interactive input

Expand All @@ -107,21 +111,25 @@ See [snippet example template](./examples/snippet_template.js).
## Keymap

You can add following setting to .vimrc

```vim
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:

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

## Thanks

- This plugin based on https://gist.github.com/3903772#file-jsdoc-vim written by [NAKAMURA, Hisashi](https://gist.github.com/sunvisor)

- The idea of npm packages installation is from [vim-lsp-settings](https://github.com/mattn/vim-lsp-settings).
Highly applicate [@mattn](https://github.com/mattn/) and all vim-lsp-settings contributors.

## LICENSE

New BSD LICENSE
2 changes: 1 addition & 1 deletion doc/jsdoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Install the distributed files into Vim runtime directory which is usually
If you install pathogen that provided from Tim Pope, you should extract the
file into 'bundle' directory.

Since ver 2.0.0, jsdoc.vim requires 'lehre'.
Since ver 2.0.0, jsdoc.vim requires 'lehre' and Node v12.x or above.
Install 'lehre' from npm or hit following command.
>
make install
Expand Down