From 9ed641aabffa6505f6e0ef3a7a8e5c0a4c552d05 Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Sat, 25 Aug 2018 21:41:15 +0800 Subject: [PATCH] Add lang#plantuml layer (#2085) * Add lang#plantuml layer --- autoload/SpaceVim/layers/lang/plantuml.vim | 23 ++++++++++++++ docs/cn/layers/index.md | 1 + docs/cn/layers/lang/plantuml.md | 34 +++++++++++++++++++++ docs/layers/index.md | 1 + docs/layers/lang/plantuml.md | 35 ++++++++++++++++++++++ wiki/en/Following-HEAD.md | 1 + 6 files changed, 95 insertions(+) create mode 100644 autoload/SpaceVim/layers/lang/plantuml.vim create mode 100644 docs/cn/layers/lang/plantuml.md create mode 100644 docs/layers/lang/plantuml.md diff --git a/autoload/SpaceVim/layers/lang/plantuml.vim b/autoload/SpaceVim/layers/lang/plantuml.vim new file mode 100644 index 000000000..1a46fe0e5 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/plantuml.vim @@ -0,0 +1,23 @@ +"============================================================================= +" plantuml.vim --- lang#plantuml layer +" Copyright (c) 2016-2017 Wang Shidong & Contributors +" Author: Wang Shidong < wsdjeg at 163.com > +" URL: https://spacevim.org +" License: GPLv3 +"============================================================================= + +function! SpaceVim#layers#lang#plantuml#plugins() abort + let plugins = [] + call add(plugins, ['aklt/plantuml-syntax', {'on_ft' : 'plantuml'}]) + call add(plugins, ['wsdjeg/vim-slumlord', {'on_ft' : 'plantuml'}]) + return plugins +endfunction + +function! SpaceVim#layers#lang#plantuml#config() abort + " call SpaceVim#mapping#space#regesit_lang_mappings('plantuml', function('s:language_specified_mappings')) +endfunction +function! s:language_specified_mappings() abort + call SpaceVim#mapping#space#langSPC('nnoremap', ['l','p'], + \ 'call SpaceVim#plugins#runner#open()', + \ 'preview uml file', 1) +endfunction diff --git a/docs/cn/layers/index.md b/docs/cn/layers/index.md index b5c3c9c69..4851266fb 100644 --- a/docs/cn/layers/index.md +++ b/docs/cn/layers/index.md @@ -89,6 +89,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管 | [lang#markdown](lang/markdown/) | 这一模块为 markdown 编辑提供支持,包括格式化、自动生成文章目录、代码块等特性。 | | [lang#perl](lang/perl/) | 这一模块为 perl 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#php](lang/php/) | 这一模块为 php 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | +| [lang#plantuml](lang/plantuml/) | 这一模块为 plantuml 开发提供支持,包括语法高亮、实时预览等特性。 | | [lang#purescript](lang/purescript/) | 这一模块为 purescript 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#python](lang/python/) | 这一模块为 python 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#ruby](lang/ruby/) | 这一模块为 ruby 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | diff --git a/docs/cn/layers/lang/plantuml.md b/docs/cn/layers/lang/plantuml.md new file mode 100644 index 000000000..e274dcf08 --- /dev/null +++ b/docs/cn/layers/lang/plantuml.md @@ -0,0 +1,34 @@ +--- +title: "SpaceVim lang#plantuml 模块" +description: "这一模块为 plantuml 开发提供支持,包括语法高亮、实时预览等特性。" +lang: cn +--- + +# [可用模块](../../) >> lang#plantuml + + + +- [模块简介](#模块简介) +- [功能特性](#功能特性) +- [启用模块](#启用模块) + + + +## 模块简介 + +这一模块为 SpaceVim 提供了 plantuml 开发支持。 + +## 功能特性 + +- 语法高亮 +- 实时预览 + + +## 启用模块 + +可通过在配置文件内加入如下配置来启用该模块: + +```toml +[[layers]] + name = "lang#plantuml" +``` diff --git a/docs/layers/index.md b/docs/layers/index.md index ff5956a23..3b52646ef 100644 --- a/docs/layers/index.md +++ b/docs/layers/index.md @@ -91,6 +91,7 @@ enable = false | [lang#ocaml](lang/ocaml/) | This layer is for Python development, provide autocompletion, syntax checking, code format for ocaml file. | | [lang#perl](lang/perl/) | This layer is for perl development, provide autocompletion, syntax checking, code format for perl file. | | [lang#php](lang/php/) | This layer adds PHP language support to SpaceVim | +| [lang#plantuml](lang/plantuml/) | This layer is for plantuml development, syntax highlighting for plantuml file. | | [lang#purescript](lang/purescript/) | This layer is for purescript development, provide autocompletion, syntax checking, code format for purescript file. | | [lang#python](lang/python/) | This layer is for Python development, provide autocompletion, syntax checking, code format for python file. | | [lang#ruby](lang/ruby/) | This layer is for ruby development, provide autocompletion, syntax checking, code format for ruby file. | diff --git a/docs/layers/lang/plantuml.md b/docs/layers/lang/plantuml.md new file mode 100644 index 000000000..a4ecf9d98 --- /dev/null +++ b/docs/layers/lang/plantuml.md @@ -0,0 +1,35 @@ +--- +title: "SpaceVim lang#plantuml layer" +description: "This layer is for plantuml development, syntax highlighting for plantuml file." +--- + +# [Available Layers](../../) >> lang#plantuml + + + +- [Description](#description) +- [Features](#features) +- [Install](#install) + - [Layer](#layer) + + + +## Description + +This layer is for plantuml development. + +## Features + +- Syntax highlighting +- Inline previews + +## Install + +### Layer + +To use this configuration layer, update custom configuration file with: + +```toml +[[layers]] + name = "lang#plantuml" +``` diff --git a/wiki/en/Following-HEAD.md b/wiki/en/Following-HEAD.md index 6d8255f7b..130e64157 100644 --- a/wiki/en/Following-HEAD.md +++ b/wiki/en/Following-HEAD.md @@ -27,6 +27,7 @@ The next release is v0.9.0. - Add `lang#WebAssembly` layer ([#2068](https://github.com/SpaceVim/SpaceVim/pull/2068)) - Add `lang#erlang` layer ([#2074](https://github.com/SpaceVim/SpaceVim/pull/2074)) - Add `lang#fsharp` layer ([#2081](https://github.com/SpaceVim/SpaceVim/pull/2081)) +- Add `lang#plantuml` layer ([#2085](https://github.com/SpaceVim/SpaceVim/pull/2085)) ### Improvement