From 75d5d91cfa7c7835e806bfbc78923f4f2d2f2cdc Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sat, 13 Jan 2018 02:11:22 +0900 Subject: [PATCH] Add a new plugin into javascript layer Add a new plugin `heavenshell/vim-jsdoc`, to generate JSDoc annotations interactively --- autoload/SpaceVim/layers/lang/javascript.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/autoload/SpaceVim/layers/lang/javascript.vim b/autoload/SpaceVim/layers/lang/javascript.vim index d32d01dd0..c6fd70a0b 100644 --- a/autoload/SpaceVim/layers/lang/javascript.vim +++ b/autoload/SpaceVim/layers/lang/javascript.vim @@ -3,6 +3,7 @@ function! SpaceVim#layers#lang#javascript#plugins() abort \ ['MaxMEllon/vim-jsx-pretty', { 'on_ft': 'javascript' }], \ ['Galooshi/vim-import-js', { \ 'on_ft': 'javascript', 'build' : 'npm install -g import-js' }], + \ ['heavenshell/vim-jsdoc', { 'on_cmd': 'JsDoc' }], \ ['maksimr/vim-jsbeautify', { 'on_ft': 'javascript' }], \ ['mmalecki/vim-node.js', { 'on_ft': 'javascript' }], \ ['moll/vim-node', { 'on_ft': 'javascript' }], @@ -102,6 +103,22 @@ function! s:on_ft() abort inoremap g :ImportJSGotoa " }}} + " 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') nnoremap K :call SpaceVim#lsp#show_doc()