mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 10:40:04 +08:00
parent
4b990165e8
commit
2cee009847
@ -41,7 +41,6 @@ function! SpaceVim#autocmds#init() abort
|
||||
autocmd FileType cs set comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,f:///,f://
|
||||
autocmd FileType vim set comments=sO:\"\ -,mO:\"\ \ ,eO:\"\",f:\"
|
||||
autocmd FileType lua set comments=f:--
|
||||
autocmd FileType vim setlocal foldmethod=marker
|
||||
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
|
||||
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
||||
autocmd Filetype html setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
|
@ -39,10 +39,8 @@ function! SpaceVim#layers#lang#javascript#set_variable(var) abort
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#javascript#config() abort
|
||||
" pangloss/vim-javascript {{{
|
||||
let g:javascript_plugin_jsdoc = 1
|
||||
let g:javascript_plugin_flow = 1
|
||||
" }}}
|
||||
|
||||
call add(g:spacevim_project_rooter_patterns, 'package.json')
|
||||
|
||||
@ -64,18 +62,16 @@ function! SpaceVim#layers#lang#javascript#config() abort
|
||||
let g:neomake_javascript_eslint_args = ['-f', 'compact', '--fix']
|
||||
endif
|
||||
|
||||
if s:auto_fix
|
||||
augroup SpaceVim_lang_javascript
|
||||
autocmd!
|
||||
autocmd FileType javascript setlocal foldmethod=syntax
|
||||
if s:auto_fix
|
||||
autocmd User NeomakeFinished checktime
|
||||
autocmd FocusGained * checktime
|
||||
endif
|
||||
augroup END
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:on_ft() abort
|
||||
" Galooshi/vim-import-js {{{
|
||||
nnoremap <silent><buffer> <F4> :ImportJSWord<CR>
|
||||
nnoremap <silent><buffer> <Leader>ji :ImportJSWord<CR>
|
||||
nnoremap <silent><buffer> <Leader>jf :ImportJSFix<CR>
|
||||
@ -85,9 +81,7 @@ function! s:on_ft() abort
|
||||
inoremap <silent><buffer> <C-j>i <Esc>:ImportJSWord<CR>a
|
||||
inoremap <silent><buffer> <C-j>f <Esc>:ImportJSFix<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
|
||||
@ -101,7 +95,6 @@ function! s:on_ft() abort
|
||||
" Enable to use ECMAScript6's Shorthand function, Arrow function.
|
||||
let g:jsdoc_enable_es6 = 1
|
||||
|
||||
" }}}
|
||||
|
||||
if SpaceVim#layers#lsp#check_filetype('javascript')
|
||||
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
|
||||
|
@ -14,13 +14,5 @@ endfunction
|
||||
|
||||
|
||||
function! SpaceVim#layers#lang#json#config() abort
|
||||
" elzr/vim-json {{{
|
||||
" conceal by default
|
||||
let g:vim_json_syntax_conceal = 0
|
||||
" }}}
|
||||
|
||||
augroup SpaceVim_d_lang_json
|
||||
autocmd!
|
||||
autocmd FileType json setlocal foldmethod=syntax
|
||||
augroup END
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user