mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:10:06 +08:00
Improve lang#pony layer (#2931)
This commit is contained in:
parent
55679b16a4
commit
675f45b84e
@ -9,10 +9,44 @@
|
||||
""
|
||||
" @section lang#pony, layer-lang-pony
|
||||
" @parentsection layers
|
||||
" This layer includes utilities and language-specific mappings for pony development.
|
||||
" >
|
||||
" [[layers]]
|
||||
" name = 'lang#pony'
|
||||
" <
|
||||
"
|
||||
|
||||
function! SpaceVim#layers#lang#pony#plugins() abort
|
||||
let plugins = []
|
||||
" .pony file type
|
||||
call add(plugins, ['jakwings/vim-pony', { 'on_ft' : 'pony'}])
|
||||
return plugins
|
||||
let plugins = []
|
||||
" .pony file type
|
||||
call add(plugins, ['wsdjeg/vim-pony', { 'on_ft' : 'pony'}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#pony#config() abort
|
||||
" @todo pony neomake support
|
||||
" in github, there is a plugin https://github.com/killerswan/pony-currycomb.vim which provides syntastic suppotr
|
||||
" checker layer configuration
|
||||
if SpaceVim#layers#isLoaded('checkers') && g:spacevim_enable_neomake
|
||||
let g:neomake_pony_enabled_makers = ['ponyc']
|
||||
let g:neomake_pony_ponyc_maker = {
|
||||
\ 'args': ['--pass=expr', '.'],
|
||||
\ 'errorformat': '%f:%l:%c: %m',
|
||||
\ 'cwd': '%:p:h',
|
||||
\ }
|
||||
let g:neomake_livescript_lsc_remove_invalid_entries = 1
|
||||
endif
|
||||
let runner = {
|
||||
\ 'exe' : 'ponyc',
|
||||
\ 'targetopt' : '-o',
|
||||
\ 'opt' : [],
|
||||
\ }
|
||||
call SpaceVim#plugins#runner#reg_runner('pony', [runner, '#TEMP#'])
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('pony', 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
|
||||
|
@ -1659,6 +1659,14 @@ checking, and jump to definition.
|
||||
==============================================================================
|
||||
LANG#PONY *SpaceVim-layer-lang-pony*
|
||||
|
||||
This layer includes utilities and language-specific mappings for pony
|
||||
development.
|
||||
>
|
||||
[[layers]]
|
||||
name = 'lang#pony'
|
||||
<
|
||||
|
||||
|
||||
==============================================================================
|
||||
LANG#PROCESSING *SpaceVim-layer-lang-processing*
|
||||
|
||||
|
@ -119,6 +119,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
|
||||
| [lang#perl](lang/perl/) | 这一模块为 Perl 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
| [lang#php](lang/php/) | 这一模块为 SpaceVim 提供了 PHP 的开发支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
| [lang#plantuml](lang/plantuml/) | 这一模块为 SpaceVim 提供了 PlantUML 的开发支持,包括语法高亮、实时预览等特性。 |
|
||||
| [lang#pony](lang/pony/) | 这一模块为 pony 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [lang#powershell](lang/powershell/) | 这一模块为 powershell 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [lang#prolog](lang/prolog/) | 这一模块为 Prolog 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [lang#puppet](lang/puppet/) | 这一模块为 SpaceVim 提供了 Puppet 的开发支持,包括语法高亮、语言服务器支持。 |
|
||||
|
37
docs/cn/layers/lang/pony.md
Normal file
37
docs/cn/layers/lang/pony.md
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
title: "SpaceVim lang#pony 模块"
|
||||
description: "这一模块为 pony 开发提供支持,包括交互式编程、一键运行等特性。"
|
||||
lang: cn
|
||||
---
|
||||
|
||||
# [可用模块](../../) >> lang#pony
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [模块简介](#模块简介)
|
||||
- [启用模块](#启用模块)
|
||||
- [快捷键](#快捷键)
|
||||
- [运行当前脚本](#运行当前脚本)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## 模块简介
|
||||
|
||||
这一模块为在 SpaceVim 中进行 pony 开发提供了支持。
|
||||
|
||||
## 启用模块
|
||||
|
||||
可通过在配置文件内加入如下配置来启用该模块:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#pony"
|
||||
```
|
||||
|
||||
## 快捷键
|
||||
|
||||
### 运行当前脚本
|
||||
|
||||
在编辑 pony 文件时,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。
|
||||
|
||||
|
@ -127,6 +127,7 @@ Some layers are enabled by default. The following example shows how to disable `
|
||||
| [lang#perl](lang/perl/) | This layer is for Perl development, provide autocompletion, syntax checking, code format for Perl file. |
|
||||
| [lang#php](lang/php/) | PHP language support, including code completion, syntax lint and code runner |
|
||||
| [lang#plantuml](lang/plantuml/) | This layer is for PlantUML development, syntax highlighting for PlantUML file. |
|
||||
| [lang#pony](lang/pony/) | This layer is for pony development, provide syntax checking, code runner and repl support for pony file. |
|
||||
| [lang#powershell](lang/powershell/) | This layer is for powershell development, provide syntax checking, code runner and repl support for powershell file. |
|
||||
| [lang#processing](lang/processing/) | This layer is for working on Processing sketches. It provides sytnax checking and an app runner |
|
||||
| [lang#prolog](lang/prolog/) | This layer is for Prolog development, provide syntax checking, code runner and repl support for prolog file. |
|
||||
|
39
docs/layers/lang/pony.md
Normal file
39
docs/layers/lang/pony.md
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "SpaceVim lang#pony layer"
|
||||
description: "This layer is for pony development, provide syntax checking, code runner and repl support for pony file."
|
||||
---
|
||||
|
||||
# [Available Layers](../../) >> lang#pony
|
||||
|
||||
<!-- 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 pony development.
|
||||
|
||||
## Install
|
||||
|
||||
To use this configuration layer, update custom configuration file with:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#pony"
|
||||
```
|
||||
## Features
|
||||
|
||||
- code runner
|
||||
|
||||
## Key bindings
|
||||
|
||||
### Running current script
|
||||
|
||||
To running a pony 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