Skip to content

Commit bb4881d

Browse files
authored
Feature/2.0.0 (#82)
* Future 2.0.0 * Fix travis settings * Fix documents * Fix initialize results * Add release-drafter
1 parent c01dcb1 commit bb4881d

22 files changed

+805
-922
lines changed

Diff for: .github/release-drafter.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name-template: 'v$NEXT_PATCH_VERSION'
2+
tag-template: '$NEXT_PATCH_VERSION'
3+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
4+
branches:
5+
- 'master'
6+
categories:
7+
- title: '🐛 Bug Fixes'
8+
labels:
9+
- 'bug'
10+
- title: '🧰 Maintenance'
11+
labels:
12+
- 'chore'
13+
- 'dependencies'
14+
- 'infra'
15+
16+
template: |
17+
## Changes
18+
19+
$CHANGES
20+
21+
## Compare
22+
23+
https://github.com/heavenshell/vim-jsdoc/compare/$PREVIOUS_TAG...$NEXT_PATCH_VERSION

Diff for: .github/workflows/release-management.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release Management
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update_draft_release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: toolmantim/[email protected]
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .gitignore

+146-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,148 @@
1-
*.swp
1+
### https://raw.github.com/github/gitignore/85bf08b19a77c62d7b6286c2db8811f2ff373b0f/Global/Vim.gitignore
2+
3+
# Swap
4+
[._]*.s[a-v][a-z]
5+
!*.svg # comment out if you don't need vector files
6+
[._]*.sw[a-p]
7+
[._]s[a-rt-v][a-z]
8+
[._]ss[a-gi-z]
9+
[._]sw[a-p]
10+
11+
# Session
12+
Session.vim
13+
Sessionx.vim
14+
15+
# Temporary
16+
.netrwhist
217
*~
3-
.DS_Store
18+
# Auto-generated tag files
419
tags
5-
tests/vader.vim
20+
# Persistent undo
21+
[._]*.un~
22+
23+
24+
### https://raw.github.com/github/gitignore/85bf08b19a77c62d7b6286c2db8811f2ff373b0f/Node.gitignore
25+
26+
# Logs
27+
logs
28+
*.log
29+
npm-debug.log*
30+
yarn-debug.log*
31+
yarn-error.log*
32+
lerna-debug.log*
33+
34+
# Diagnostic reports (https://nodejs.org/api/report.html)
35+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
36+
37+
# Runtime data
38+
pids
39+
*.pid
40+
*.seed
41+
*.pid.lock
42+
43+
# Directory for instrumented libs generated by jscoverage/JSCover
44+
lib-cov
45+
46+
# Coverage directory used by tools like istanbul
47+
coverage
48+
*.lcov
49+
50+
# nyc test coverage
51+
.nyc_output
52+
53+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
54+
.grunt
55+
56+
# Bower dependency directory (https://bower.io/)
57+
bower_components
58+
59+
# node-waf configuration
60+
.lock-wscript
61+
62+
# Compiled binary addons (https://nodejs.org/api/addons.html)
63+
build/Release
64+
65+
# Dependency directories
66+
node_modules/
67+
jspm_packages/
68+
69+
# TypeScript v1 declaration files
70+
typings/
71+
72+
# TypeScript cache
73+
*.tsbuildinfo
74+
75+
# Optional npm cache directory
76+
.npm
77+
78+
# Optional eslint cache
79+
.eslintcache
80+
81+
# Optional REPL history
82+
.node_repl_history
83+
84+
# Output of 'npm pack'
85+
*.tgz
86+
87+
# Yarn Integrity file
88+
.yarn-integrity
89+
90+
# dotenv environment variables file
91+
.env
92+
.env.test
93+
94+
# parcel-bundler cache (https://parceljs.org/)
95+
.cache
96+
97+
# next.js build output
98+
.next
99+
100+
# nuxt.js build output
101+
.nuxt
102+
103+
# vuepress build output
104+
.vuepress/dist
105+
106+
# Serverless directories
107+
.serverless/
108+
109+
# FuseBox cache
110+
.fusebox/
111+
112+
# DynamoDB Local files
113+
.dynamodb/
114+
115+
116+
### https://raw.github.com/github/gitignore/85bf08b19a77c62d7b6286c2db8811f2ff373b0f/Global/macOS.gitignore
117+
118+
# General
119+
.DS_Store
120+
.AppleDouble
121+
.LSOverride
122+
123+
# Icon must end with two \r
124+
Icon
125+
126+
# Thumbnails
127+
._*
128+
129+
# Files that might appear in the root of a volume
130+
.DocumentRevisions-V100
131+
.fseventsd
132+
.Spotlight-V100
133+
.TemporaryItems
134+
.Trashes
135+
.VolumeIcon.icns
136+
.com.apple.timemachine.donotpresent
137+
138+
# Directories potentially created on remote AFP share
139+
.AppleDB
140+
.AppleDesktop
141+
Network Trash Folder
142+
Temporary Items
143+
.apdisk
144+
145+
# App
146+
lib/node_modules
147+
lib/lehre
148+
tests/vader.vim/

Diff for: .travis.yml

+24-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
sudo: required
2-
dist: xenial
1+
sudo: false
2+
group: travis_latest
33
language: vim
44

5-
install:
5+
cache:
6+
apt: true
7+
yarn: true
8+
ccache: true
9+
10+
before_install:
611
- git clone https://github.com/junegunn/vader.vim.git tests/vader.vim
7-
- git clone https://github.com/vim/vim /tmp/vim
8-
- cd /tmp/vim
9-
- sudo apt-get install -y gettext libncurses5-dev libacl1-dev libgpm-dev
10-
- ./configure --with-features=huge --enable-fail-if-missing --enable-pythoninterp --prefix=$HOME/bin/vim
11-
- make && make install
12-
- git clone https://github.com/junegunn/vader.vim.git
13-
- export VIM_EXE=$HOME/bin/vim/bin/vim
14-
- cd $HOME/build/heavenshell/vim-jsdoc/tests
15-
- npm install
1612

17-
before_script:
18-
- cd $HOME/build/heavenshell/vim-jsdoc/tests
13+
jobs:
14+
include:
15+
- env: ENV="Vim8"
16+
install:
17+
- git clone https://github.com/vim/vim /tmp/vim
18+
- cd /tmp/vim
19+
- sudo apt-get install -y gettext libncurses5-dev libacl1-dev libgpm-dev
20+
- ./configure --with-features=huge --enable-fail-if-missing --enable-pythoninterp --prefix=$HOME/bin/vim
21+
- make && make install
22+
23+
before_script:
24+
- cd $HOME/build/heavenshell/vim-jsdoc
25+
- make install
1926

20-
script:
21-
- VIM_EXE=$HOME/bin/vim/bin/vim ./run.sh > /dev/null && echo Success || echo Fail
27+
script:
28+
- cd $HOME/build/heavenshell/vim-jsdoc/tests
29+
- VIM_EXE=$HOME/bin/vim/bin/vim ./run.sh

Diff for: Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.PHONY: install
2+
install:
3+
bash lib/install.sh
4+
5+
.PHONY: clean
6+
clean:
7+
rm -rf lib/lehre lib/node_modules lib/yarn.lock

Diff for: README.md

+66-53
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,93 @@
1-
jsdoc.vim
2-
=========
1+
# jsdoc.vim
32

43
[![Build Status](https://travis-ci.org/heavenshell/vim-jsdoc.svg?branch=master)](https://travis-ci.org/heavenshell/vim-jsdoc)
54

65
jsdoc.vim generates [JSDoc](http://usejsdoc.org/) block comments based on a function signature.
76

8-
![Move cursor to function keyword line, then type `:JsDoc`. If g:jsdoc_allow_input_prompt is enabled, prompt input description, argument type, parameter description. If g:jsdoc_allow_input_prompt is disabled, insert JsDoc automatically.](https://github.com/heavenshell/vim-jsdoc/wiki/images/vim-jsdoc-screencast-preview.gif)
7+
![jsdoc.vim](./assets/jsdoc.gif)
98

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

12-
Depending on your configuration, jsdoc.vim will prompt for description, `@return` type and description. It will also prompt you for types and descriptions for each function `@param`.
11+
Since version 2.0.0 jsdoc.vim is support only **Vim8**.
1312

14-
Data type tab completion supported for parameter and return types
15-
* currently: `boolean`, `null`, `undefined`, `number`, `string`, `symbol`, `object`, `function`, `array`, `typedArray`, `date`, `promise`, `proxy`, `map`, `set`, `weakmap`, `weakset`, `error`, `regexp`
13+
If you want use old version checkout [1.0.0](https://github.com/heavenshell/vim-jsdoc/releases/tag/1.0.0>).
14+
15+
## Install
16+
17+
Since version 2.0.0, jsdoc.vim requires [lehre](https://www.npmjs.com/package/lehre).
18+
19+
You can install following command.
20+
21+
```console
22+
make install
23+
```
24+
25+
If you want to update `lehre` hit following commands.
26+
27+
```console
28+
make clean
29+
make Install
30+
```
31+
32+
If you want install lehre manually, you can install from npm.
33+
34+
```console
35+
$ yarn add -D lehre
36+
```
37+
38+
Than set installed `/path/to/node_modules/.bin/lehre` path to `g:jsdoc_lehre_path`.
1639

1740
## Usage
1841

19-
1. Move cursor on `function` keyword line.
20-
2. Type `:JsDoc` to insert JSDoc.
21-
3. Insert JSDoc above the `function` keyword line.
42+
1. Move cursor on `function` keyword line
43+
1. Type `:JsDoc` to insert JSDoc
44+
1. Insert JSDoc above the `function` keyword line
45+
46+
## Format
47+
48+
1. Type `:JsDocFormat`
49+
1. Insert JSDoc above the all signatures
2250

2351
## Configuration
2452

25-
Option | Default | Description
26-
:-------------------------------------- | :------ | :----------
27-
**g:jsdoc_allow_input_prompt** | 0 | Allow prompt for interactive input.
28-
**g:jsdoc_input_description** | 0 | Prompt for a function description
29-
**g:jsdoc_additional_descriptions** | 0 | Prompt for a value for `@name`, add it to the JSDoc block comment along with the `@function` tag.
30-
**g:jsdoc_return** | 1 | Add the `@return` tag.
31-
**g:jsdoc_return_type** | 1 | Prompt for and add a type for the aforementioned `@return` tag.
32-
**g:jsdoc_return_description** | 1 | Prompt for and add a description for the `@return` tag.
33-
**g:jsdoc_access_descriptions** | 0 | Set value to 1 to turn on access tags like `@access <private\|public>`. Set value to 2 to turn on access tags like `@<private\|public>`
34-
**g:jsdoc_underscore_private** | 0 | Set value to 1 to turn on detecting underscore starting functions as private convention
35-
**g:jsdoc_allow_shorthand** | 0 | Set value to 1 to allow ECMAScript6 shorthand syntax. Since ver `0.5.0` deprecated. Use `g:jsdoc_enable_es6` instead.
36-
**g:jsdoc_param_description_separator** | ' ' | Characters used to separate `@param` name and description.
37-
**g:jsdoc_custom_args_hook** | {} | Override default type and description. See help more detail.
38-
**g:jsdoc_custom_args_regex_only** | 0 | When using `custom_args_hook`, only match against regexes
39-
**g:jsdoc_type_hook** | {} | Allow to insert default description depending on the type.
40-
**g:jsdoc_enable_es6** | 0 | Enable to use ECMAScript6's Shorthand function, Arrow function.
41-
**g:jsdoc_tags** | see :h | Allow use of alternate tags (the ones that support synonyms) per JSDoc documentation. Can be changed on a per tag basis, for example: `let g:jsdoc_tags = {} \| let g:jsdoc_tags['param'] = 'arg'`
42-
**g:jsdoc_user_defined_tags** | {} | Allow use of `user_defined_tags`.
53+
Option |Default |Description
54+
:--------------------------|:-------------|:-----------------------
55+
**g:jsdoc_templates_path** |'' |Path to custom template.
56+
**g:jsdoc_formatter** |'jsdoc' |Document block formatter, `jsdoc`, `esdoc`, `tsdoc`
57+
**g:jsdoc_lehre_path** |'./lib/lehre' |Path to [`lehre`](https://www.npmjs.com/package/lehre).
58+
59+
## Formatter
60+
61+
You can choose formatter from [JsDoc](https://jsdoc.app/), [ESDoc](https://esdoc.org/), [TSDoc](https://github.com/microsoft/tsdoc).
62+
63+
If you want to create your own template, see [example template](https://github.com/heavenshell/ts-lehre/tree/master/examples).
64+
65+
## Intaractive input
66+
67+
Since ver 2.0.0 input `Allow prompt for interactive input` is deprecated.
68+
69+
If you want input Intaractively, use snippet plugin.
70+
71+
See [snippet example template](./examples/snippet_template.js).
4372

4473
## Keymap
45-
Since version `0.3`, `g:jsdoc_default_mapping` was removed.
4674

47-
Add following setting to .vimrc if you want same behavior as version `0.2.1`.
48-
```viml
75+
You can add following setting to .vimrc
76+
```vim
4977
nmap <silent> <C-l> <Plug>(jsdoc)
5078
```
5179

5280
Alternatively, you could add the following setting to your .vimrc to search for the last `function` declaration
5381
and puts your jsdoc above it:
54-
```viml
82+
```vim
5583
nmap <silent> <C-l> ?function<cr>:noh<cr><Plug>(jsdoc)
5684
```
5785

58-
## TypeScript
59-
Since ver 0.10.0 jsdoc.vim support TypeScript.
86+
## Thanks
87+
- This plugin based on https://gist.github.com/3903772#file-jsdoc-vim written by [NAKAMURA, Hisashi](https://gist.github.com/sunvisor)
6088

61-
```typescript
62-
function foo(foo: string): string {
63-
return 'foo'
64-
}
65-
```
89+
- The idea of npm packages installation is from [vim-lsp-settings](https://github.com/mattn/vim-lsp-settings).
90+
Highly applicate [@mattn](https://github.com/mattn/) and all vim-lsp-settings contributors.
6691

67-
`:JsDoc` would generate following.
68-
69-
```typescript
70-
/**
71-
* foo
72-
*
73-
* @param {string} foo
74-
* @returns {string}
75-
*/
76-
function foo(foo: string): string {
77-
return 'foo'
78-
}
79-
```
80-
`param` and `returns` set `type` automatically.
92+
## LICENSE
93+
New BSD LICENSE

Diff for: assets/jsdoc.gif

2.53 MB
Loading

0 commit comments

Comments
 (0)