Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6e5bc2a

Browse files
Merge pull request #125 from Hwlhwlxyz/patch-windows
add windows support, and update the README.md
2 parents 9234b2e + c8d22b1 commit 6e5bc2a

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

‎README.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,23 @@ make clean
6767
make install
6868
```
6969

70-
If you want install lehre manually, you can install from npm.
70+
If you want to install lehre manually, you can install from npm.
7171

7272
```console
7373
$ yarn add -D lehre
7474
```
7575

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

78+
#### Installing on Windows
79+
80+
```console
81+
# cd to <vim-jsdoc path>/lib
82+
npm install
83+
```
84+
85+
If you want to set the path of [lehre](https://www.npmjs.com/package/lehre) manually on Windows, you should use the path with the file extension `.cmd`, such as `/path/to/node_modules/.bin/lehre.cmd`.
86+
7887
## Usage
7988

8089
1. Move cursor on `function` keyword line

‎autoload/jsdoc.vim‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@ set cpo&vim
99

1010
let g:jsdoc_templates_path = get(g:, 'jsdoc_templates_path', '')
1111
let g:jsdoc_formatter = get(g:, 'jsdoc_formatter', 'jsdoc')
12-
let g:jsdoc_lehre_path = get(
13-
\ g:,
14-
\ 'jsdoc_lehre_path',
15-
\ printf('%s/lib/lehre', expand('<sfile>:p:h:h'))
16-
\ )
12+
if has("win64") || has("win32") || has("win16")
13+
let g:jsdoc_lehre_path = get(
14+
\ g:,
15+
\ 'jsdoc_lehre_path',
16+
\ printf('%s/lib/node_modules/.bin/lehre.cmd', expand('<sfile>:p:h:h'))
17+
\ )
18+
else
19+
let g:jsdoc_lehre_path = get(
20+
\ g:,
21+
\ 'jsdoc_lehre_path',
22+
\ printf('%s/lib/lehre', expand('<sfile>:p:h:h'))
23+
\ )
24+
endif
1725

1826
let s:is_method_regex = '^.\{-}\s*\([a-zA-Z_$][a-zA-Z0-9_$]*\)\s*(\s*\([^)]*\)\s*).*$'
1927
let s:is_declarelation = '^.\{-}=\s*\(\([a-zA-Z_$][a-zA-Z0-9_$]*\)\s*(\s*\([^)]*\)\s*)\|(\s*\([^)]*\)\s*\).*$'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /