1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:50:03 +08:00

Add a new plugin into javascript layer

Add a new plugin `heavenshell/vim-jsdoc`, to generate JSDoc annotations
interactively
This commit is contained in:
Seong Yong-ju 2018-01-13 02:11:22 +09:00
parent bacbf28bf6
commit 75d5d91cfa

View File

@ -3,6 +3,7 @@ function! SpaceVim#layers#lang#javascript#plugins() abort
\ ['MaxMEllon/vim-jsx-pretty', { 'on_ft': 'javascript' }], \ ['MaxMEllon/vim-jsx-pretty', { 'on_ft': 'javascript' }],
\ ['Galooshi/vim-import-js', { \ ['Galooshi/vim-import-js', {
\ 'on_ft': 'javascript', 'build' : 'npm install -g import-js' }], \ 'on_ft': 'javascript', 'build' : 'npm install -g import-js' }],
\ ['heavenshell/vim-jsdoc', { 'on_cmd': 'JsDoc' }],
\ ['maksimr/vim-jsbeautify', { 'on_ft': 'javascript' }], \ ['maksimr/vim-jsbeautify', { 'on_ft': 'javascript' }],
\ ['mmalecki/vim-node.js', { 'on_ft': 'javascript' }], \ ['mmalecki/vim-node.js', { 'on_ft': 'javascript' }],
\ ['moll/vim-node', { 'on_ft': 'javascript' }], \ ['moll/vim-node', { 'on_ft': 'javascript' }],
@ -102,6 +103,22 @@ function! s:on_ft() abort
inoremap <silent><buffer> <C-j>g <Esc>:ImportJSGoto<CR>a inoremap <silent><buffer> <C-j>g <Esc>:ImportJSGoto<CR>a
" }}} " }}}
" heavenshell/vim-jsdoc {{{
" Allow prompt for interactive input.
let g:jsdoc_allow_input_prompt = 1
" Prompt for a function description
let g:jsdoc_input_description = 1
" Set value to 1 to turn on detecting underscore starting functions as private convention
let g:jsdoc_underscore_private = 1
" Enable to use ECMAScript6's Shorthand function, Arrow function.
let g:jsdoc_enable_es6 = 1
" }}}
if SpaceVim#layers#lsp#check_filetype('javascript') if SpaceVim#layers#lsp#check_filetype('javascript')
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR> nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>