mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-15 15:19:27 +08:00
36 lines
1008 B
VimL
36 lines
1008 B
VimL
"=============================================================================
|
|
" treesitter.vim --- treesitter layer for SpaceVim
|
|
" Copyright (c) 2016-2023 Wang Shidong & Contributors
|
|
" Author: Wang Shidong < wsdjeg@outlook.com >
|
|
" URL: https://spacevim.org
|
|
" License: GPLv3
|
|
"=============================================================================
|
|
|
|
""
|
|
" @section treesitter, layers-treesitter
|
|
" @parentsection layers
|
|
" This layer provides treesitter support for SpaceVim.
|
|
|
|
function! SpaceVim#layers#treesitter#plugins() abort
|
|
let plugins = []
|
|
call add(plugins, [g:_spacevim_root_dir . 'bundle/nvim-treesitter',
|
|
\ {
|
|
\ 'merged' : 0,
|
|
\ 'loadconf' : 1 ,
|
|
\ 'do' : 'TSUpdate',
|
|
\ 'loadconf_before' : 1
|
|
\ }])
|
|
return plugins
|
|
endfunction
|
|
|
|
function! SpaceVim#layers#treesitter#health() abort
|
|
call SpaceVim#layers#treesitter#plugins()
|
|
return 1
|
|
endfunction
|
|
|
|
function! SpaceVim#layers#treesitter#loadable() abort
|
|
|
|
return has('nvim')
|
|
|
|
endfunction
|