mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:20:04 +08:00
feat(layer): add treesitter
layer
This commit is contained in:
parent
fde91a541e
commit
22b663b5b9
18
autoload/SpaceVim/layers/treesitter.vim
Normal file
18
autoload/SpaceVim/layers/treesitter.vim
Normal file
@ -0,0 +1,18 @@
|
||||
"=============================================================================
|
||||
" treesitter.vim --- treesitter layer for SpaceVim
|
||||
" Copyright (c) 2016-2019 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, ['nvim-treesitter/nvim-treesitter', {'do' : ':TSUpdate'}])
|
||||
return plugins
|
||||
endfunction
|
@ -197,8 +197,9 @@ CONTENTS *SpaceVim-contents*
|
||||
111. tools#dash.............................|SpaceVim-layers-tools-dash|
|
||||
112. tools#mpv...............................|SpaceVim-layers-tools-mpv|
|
||||
113. tools#zeal.............................|SpaceVim-layers-tools-zeal|
|
||||
114. ui.............................................|SpaceVim-layers-ui|
|
||||
115. unite.......................................|SpaceVim-layers-unite|
|
||||
114. treesitter.............................|SpaceVim-layers-treesitter|
|
||||
115. ui.............................................|SpaceVim-layers-ui|
|
||||
116. unite.......................................|SpaceVim-layers-unite|
|
||||
7. Usage....................................................|SpaceVim-usage|
|
||||
1. buffers-and-files..................|SpaceVim-usage-buffers-and-files|
|
||||
2. custom_plugins........................|SpaceVim-usage-custom_plugins|
|
||||
@ -4494,6 +4495,11 @@ TOOLS#ZEAL *SpaceVim-layers-tools-zeal*
|
||||
|
||||
This layer provides Zeal integration for SpaceVim
|
||||
|
||||
==============================================================================
|
||||
TREESITTER *SpaceVim-layers-treesitter*
|
||||
|
||||
This layer provides treesitter support for SpaceVim.
|
||||
|
||||
==============================================================================
|
||||
UI *SpaceVim-layers-ui*
|
||||
|
||||
|
27
docs/cn/layers/treesitter.md
Normal file
27
docs/cn/layers/treesitter.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "SpaceVim treesitter 模块"
|
||||
description: "这一模块为 SpaceVim 提供了一些在 Vim 内操作 treesitter 的功能"
|
||||
lang: zh
|
||||
---
|
||||
|
||||
# [可用模块](../) >> treesitter
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [模块简介](#模块简介)
|
||||
- [启用模块](#启用模块)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## 模块简介
|
||||
|
||||
该模块主要提供了一些在 Vim 内操作 treesitter 的功能。
|
||||
|
||||
## 启用模块
|
||||
|
||||
可通过在配置文件内加入如下配置来启用该模块:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "treesitter"
|
||||
```
|
26
docs/layers/treesitter.md
Normal file
26
docs/layers/treesitter.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "SpaceVim treesitter layer"
|
||||
description: "This layers adds extensive support for treesitter"
|
||||
---
|
||||
|
||||
# [Available Layers](../) >> treesitter
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Description
|
||||
|
||||
This layer adds support for treesitter in neovim.
|
||||
|
||||
## Install
|
||||
|
||||
To use this configuration layer, update your custom configuration file with:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "treesitter"
|
||||
```
|
Loading…
Reference in New Issue
Block a user