1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-13 17:40:40 +08:00

Add lang/javascript layer

This commit is contained in:
wsdjeg 2017-01-21 21:47:36 +08:00
parent 7557399f74
commit 4dc3d806b8
3 changed files with 24 additions and 4 deletions

View File

@ -11,13 +11,9 @@ function! SpaceVim#layers#lang#plugins() abort
\ ['digitaltoad/vim-jade', { 'on_ft' : ['jade']}],
\ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}],
\ ['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}],
\ ['pangloss/vim-javascript', { 'on_ft' : ['javascript']}],
\ ['maksimr/vim-jsbeautify', { 'on_ft' : ['javascript']}],
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
\ ['mmalecki/vim-node.js', { 'on_ft' : ['javascript']}],
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
\ ['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}],
\ ['syngan/vim-vimlint', { 'on_ft' : 'vim'}],
\ ['ynkdir/vim-vimlparser', { 'on_ft' : 'vim'}],
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],

View File

@ -0,0 +1,23 @@
function! SpaceVim#layers#lang#javascript#plugins() abort
let plugins = []
cal add(plugins,['pangloss/vim-javascript', { 'on_ft' : ['javascript']}])
if has('nvim')
call add(plugins,['carlitux/deoplete-ternjs', { 'on_ft' : ['javascript']}])
else
call add(plugins,['ternjs/tern_for_vim', { 'on_ft' : ['javascript']}])
endif
call add(plugins,['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}])
call add(plugins,['mmalecki/vim-node.js', { 'on_ft' : ['javascript']}])
call add(plugins,['maksimr/vim-jsbeautify', { 'on_ft' : ['javascript']}])
return plugins
endfunction
"let g:javascript_conceal_function = "ƒ"
"let g:javascript_conceal_null = "ø"
"let g:javascript_conceal_this = "@"
"let g:javascript_conceal_return = "⇚"
"let g:javascript_conceal_undefined = "¿"
"let g:javascript_conceal_NaN = ""
"let g:javascript_conceal_prototype = "¶"
"let g:javascript_conceal_static = "•"
"let g:javascript_conceal_super = "Ω"
"let g:javascript_conceal_arrow_function = "⇒"

View File

@ -12,6 +12,7 @@ let g:deoplete#omni#input_patterns.java = [
\'[^. \t0-9]\::\w*',
\]
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
let g:deoplete#omni_patterns.php = '->\|::'