mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:30:05 +08:00
Add lang#chapel layer (#3118)
This commit is contained in:
parent
02cd0520fb
commit
e73553e254
23
autoload/SpaceVim/layers/lang/chapel.vim
Normal file
23
autoload/SpaceVim/layers/lang/chapel.vim
Normal file
@ -0,0 +1,23 @@
|
||||
"=============================================================================
|
||||
" chapel.vim --- chapel language support
|
||||
" Copyright (c) 2016-2019 Wang Shidong & Contributors
|
||||
" Author: Wang Shidong < wsdjeg@outlook.com >
|
||||
" URL: https://spacevim.org
|
||||
" License: GPLv3
|
||||
"=============================================================================
|
||||
|
||||
|
||||
function! SpaceVim#layers#lang#chapel#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins, ['wsdjeg/vim-chapel', { 'merged' : 0}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#chapel#config() abort
|
||||
call SpaceVim#plugins#runner#reg_runner('chapel', ['chpl -o #TEMP# %s', '#TEMP#'])
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('chapel', function('s:language_specified_mappings'))
|
||||
endfunction
|
||||
|
||||
function! s:language_specified_mappings() abort
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','r'], 'call SpaceVim#plugins#runner#open()', 'execute current file', 1)
|
||||
endfunction
|
34
docs/cn/layers/lang/chapel.md
Normal file
34
docs/cn/layers/lang/chapel.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "SpaceVim lang#chapel 模块"
|
||||
description: "这一模块为 chapel 开发提供支持,包括交互式编程、一键运行等特性。"
|
||||
lang: zh
|
||||
---
|
||||
|
||||
# [可用模块](../../) >> lang#chapel
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [模块简介](#模块简介)
|
||||
- [启用模块](#启用模块)
|
||||
- [快捷键](#快捷键)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## 模块简介
|
||||
|
||||
这一模块为在 SpaceVim 中进行 chapel 开发提供了支持。
|
||||
|
||||
## 启用模块
|
||||
|
||||
可通过在配置文件内加入如下配置来启用该模块:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#chapel"
|
||||
```
|
||||
|
||||
## 快捷键
|
||||
|
||||
在编辑 chapel 文件时,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。
|
||||
|
||||
|
38
docs/layers/lang/chapel.md
Normal file
38
docs/layers/lang/chapel.md
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
title: "SpaceVim lang#chapel layer"
|
||||
description: "This layer is for chapel development, provide syntax checking, code runner and repl support for chapel file."
|
||||
---
|
||||
|
||||
# [Available Layers](../../) >> lang#chapel
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
- [Features](#features)
|
||||
- [Key bindings](#key-bindings)
|
||||
- [Running current script](#running-current-script)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Description
|
||||
|
||||
This layer is for chapel development.
|
||||
|
||||
## Install
|
||||
|
||||
To use this configuration layer, update custom configuration file with:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#chapel"
|
||||
```
|
||||
## Features
|
||||
|
||||
- code runner
|
||||
|
||||
## Key bindings
|
||||
|
||||
### Running current script
|
||||
|
||||
To running a chapel file, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
|
Loading…
Reference in New Issue
Block a user