1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-22 17:05:42 +08:00

Add vim-jsdoc to typescript layer (#2527)

* Add vim-jsdoc to typescript layer

* Improve typescript layer doc
This commit is contained in:
Wang Shidong 2019-01-30 14:05:52 +08:00 committed by GitHub
parent b381aa88bd
commit a700d516da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -10,6 +10,7 @@
function! SpaceVim#layers#lang#typescript#plugins() abort function! SpaceVim#layers#lang#typescript#plugins() abort
let plugins = [] let plugins = []
call add(plugins, ['leafgarland/typescript-vim']) call add(plugins, ['leafgarland/typescript-vim'])
call add(plugins, ['heavenshell/vim-jsdoc', { 'on_cmd': 'JsDoc' }])
if !SpaceVim#layers#lsp#check_filetype('typescript') if !SpaceVim#layers#lsp#check_filetype('typescript')
if has('nvim') if has('nvim')
call add(plugins, ['mhartington/nvim-typescript', {'build': './install.sh'}]) call add(plugins, ['mhartington/nvim-typescript', {'build': './install.sh'}])
@ -91,6 +92,11 @@ function! s:on_ft() abort
\ 'references', 1) \ 'references', 1)
endif endif
endif endif
let g:_spacevim_mappings_space.l.g = {'name' : '+Generate'}
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'g', 'd'], 'JsDoc',
\ 'generate JSDoc', 1)
endfunction endfunction
function! s:go_to_def() abort function! s:go_to_def() abort

View File

@ -62,4 +62,5 @@ npm install -g typescript
| `SPC l r` | references | | `SPC l r` | references |
| `SPC l s` | search | | `SPC l s` | search |
| `SPC l t` | type | | `SPC l t` | type |
| `SPC l g d` | generate doc |
| `g d` | defintion preview | | `g d` | defintion preview |

View File

@ -1,6 +1,6 @@
--- ---
title: "SpaceVim lang#typescript layer" title: "SpaceVim lang#typescript layer"
description: "This layer is for TypeScript development" description: "This layer is for TypeScript development, includding code completion, Syntax lint, and doc generation."
--- ---
# [Available Layers](../../) >> lang#typescript # [Available Layers](../../) >> lang#typescript
@ -17,7 +17,7 @@ description: "This layer is for TypeScript development"
## Description ## Description
This layer is for TypeScript development. This layer is for TypeScript development, includding code completion, Syntax lint, and doc generation.
## Install ## Install
@ -61,4 +61,5 @@ npm install -g typescript
| `SPC l r` | references | | `SPC l r` | references |
| `SPC l s` | search | | `SPC l s` | search |
| `SPC l t` | type | | `SPC l t` | type |
| `g d` | defintion preview | | `SPC l g d` | generate doc |
| `g d` | defintion preview |