mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:30:04 +08:00
Add vim-jsdoc to typescript layer (#2527)
* Add vim-jsdoc to typescript layer * Improve typescript layer doc
This commit is contained in:
parent
b381aa88bd
commit
a700d516da
@ -10,6 +10,7 @@
|
||||
function! SpaceVim#layers#lang#typescript#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins, ['leafgarland/typescript-vim'])
|
||||
call add(plugins, ['heavenshell/vim-jsdoc', { 'on_cmd': 'JsDoc' }])
|
||||
if !SpaceVim#layers#lsp#check_filetype('typescript')
|
||||
if has('nvim')
|
||||
call add(plugins, ['mhartington/nvim-typescript', {'build': './install.sh'}])
|
||||
@ -91,6 +92,11 @@ function! s:on_ft() abort
|
||||
\ 'references', 1)
|
||||
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
|
||||
|
||||
function! s:go_to_def() abort
|
||||
|
@ -62,4 +62,5 @@ npm install -g typescript
|
||||
| `SPC l r` | references |
|
||||
| `SPC l s` | search |
|
||||
| `SPC l t` | type |
|
||||
| `SPC l g d` | generate doc |
|
||||
| `g d` | defintion preview |
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
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
|
||||
@ -17,7 +17,7 @@ description: "This layer is for TypeScript development"
|
||||
|
||||
## Description
|
||||
|
||||
This layer is for TypeScript development.
|
||||
This layer is for TypeScript development, includding code completion, Syntax lint, and doc generation.
|
||||
|
||||
## Install
|
||||
|
||||
@ -61,4 +61,5 @@ npm install -g typescript
|
||||
| `SPC l r` | references |
|
||||
| `SPC l s` | search |
|
||||
| `SPC l t` | type |
|
||||
| `g d` | defintion preview |
|
||||
| `SPC l g d` | generate doc |
|
||||
| `g d` | defintion preview |
|
||||
|
Loading…
Reference in New Issue
Block a user