mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-13 13:39:09 +08:00
Add lang#zig layer (#3355)
This commit is contained in:
parent
e53d3612fc
commit
e3344fa308
22
autoload/SpaceVim/layers/lang/zig.vim
Normal file
22
autoload/SpaceVim/layers/lang/zig.vim
Normal file
@ -0,0 +1,22 @@
|
||||
"=============================================================================
|
||||
" zig.vim --- zig 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#zig#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins, ['ziglang/zig.vim', { 'merged' : 0}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#zig#config() abort
|
||||
call SpaceVim#plugins#runner#reg_runner('zig', 'zig run %s')
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('zig', 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
|
@ -115,6 +115,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
|
||||
| [lang#io](lang/io/) | 这一模块为 io 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [lang#ipynb](lang/ipynb/) | 该模块为 SpaceVim 添加了 Jupyter Notebook 支持,包括语法高亮、代码折叠等特点。 |
|
||||
| [lang#j](lang/j/) | 这一模块为 j 开发提供支持,包括交互式编程和语法高亮。 |
|
||||
| [lang#janet](lang/janet/) | 这一模块为 janet 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [lang#java](lang/java/) | 这一模块为 Java 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
| [lang#javascript](lang/javascript/) | 这一模块为 JavaScript 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
| [lang#julia](lang/julia/) | 这一模块为 Julia 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
@ -156,6 +157,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
|
||||
| [lang#vim](lang/vim/) | 这一模块为 SpaceVim 提供了 Vimscript 的开发支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
| [lang#vue](lang/vue/) | 这一模块为 SpaceVim 提供了 Vue 的的开发支持,包括代码补全、语法检查、代码格式化等特性。 |
|
||||
| [lang#wolfram](lang/wolfram/) | 这一模块为 wolfram 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [lang#zig](lang/zig/) | 这一模块为 zig 开发提供支持,包括交互式编程、一键运行等特性。 |
|
||||
| [language-server-protocol](language-server-protocol/) | 这一模块为 SpaceVim 提供了 language server protocol 的支持,提供更多语言相关服务。 |
|
||||
| [leaderf](leaderf/) | 这一模块为 SpaceVim 提供了以 leaderf 为核心的异步模糊查找机制,支持模糊搜索文件、历史记录、函数列表等。 |
|
||||
| [shell](shell/) | 这一模块为 SpaceVim 提供了终端集成特性,优化内置终端的使用体验。 |
|
||||
|
38
docs/cn/layers/lang/zig.md
Normal file
38
docs/cn/layers/lang/zig.md
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
title: "SpaceVim lang#zig 模块"
|
||||
description: "这一模块为 zig 开发提供支持,包括交互式编程、一键运行等特性。"
|
||||
lang: zh
|
||||
---
|
||||
|
||||
# [可用模块](../../) >> lang#zig
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [模块简介](#模块简介)
|
||||
- [启用模块](#启用模块)
|
||||
- [快捷键](#快捷键)
|
||||
- [运行当前脚本](#运行当前脚本)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## 模块简介
|
||||
|
||||
这一模块为在 SpaceVim 中进行 [zig](https://ziglang.org/) 开发提供了支持。
|
||||
|
||||
## 启用模块
|
||||
|
||||
可通过在配置文件内加入如下配置来启用该模块:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#zig"
|
||||
```
|
||||
|
||||
## 快捷键
|
||||
|
||||
### 运行当前脚本
|
||||
|
||||
在编辑 zig 文件时,可通过快捷键 `SPC l r` 快速异步运行当前文件,
|
||||
运行结果会展示在一个独立的执行窗口内。
|
||||
|
||||
|
@ -124,6 +124,7 @@ Some layers are enabled by default. The following example shows how to disable `
|
||||
| [lang#io](lang/io/) | This layer is for io development, provide code runner and repl support for io file. |
|
||||
| [lang#ipynb](lang/ipynb/) | This layer adds Jupyter Notebook support to SpaceVim |
|
||||
| [lang#j](lang/j/) | This layer is for j development, provide syntax checking and repl support for j file. |
|
||||
| [lang#janet](lang/janet/) | This layer is for janet development, provide code runner and repl support for janet file. |
|
||||
| [lang#java](lang/java/) | This layer is for Java development. All the features such as code completion, formatting, syntax checking, REPL and debug have be done in this layer. |
|
||||
| [lang#javascript](lang/javascript/) | This layer provides JavaScript development support for SpaceVim, including code completion, syntax highlighting and syntax checking |
|
||||
| [lang#julia](lang/julia/) | This layer is for Julia development, provide autocompletion, syntax checking and code formatting |
|
||||
@ -167,6 +168,7 @@ Some layers are enabled by default. The following example shows how to disable `
|
||||
| [lang#vim](lang/vim/) | This layer is for writting Vimscript, including code completion, syntax checking and buffer formatting |
|
||||
| [lang#vue](lang/vue/) | This layer adds Vue language support to SpaceVim |
|
||||
| [lang#wolfram](lang/wolfram/) | This layer is for walfram development, provide syntax checking, code runner and repl support for walfram file. |
|
||||
| [lang#zig](lang/zig/) | This layer is for zig development, provide code runner support for zig file. |
|
||||
| [language-server-protocol](language-server-protocol/) | This layers provides language server protocol for vim and neovim |
|
||||
| [leaderf](leaderf/) | This layers provide a heavily customized LeaderF centric work-flow |
|
||||
| [shell](shell/) | This layer provide shell support in SpaceVim |
|
||||
|
34
docs/layers/lang/zig.md
Normal file
34
docs/layers/lang/zig.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "SpaceVim lang#zig layer"
|
||||
description: "This layer is for zig development, provide code runner support for zig file."
|
||||
---
|
||||
|
||||
# [Available Layers](../../) >> lang#zig
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
- [Key bindings](#key-bindings)
|
||||
- [Running current script](#running-current-script)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Description
|
||||
|
||||
This layer is for [zig](https://ziglang.org/) development.
|
||||
|
||||
## Install
|
||||
|
||||
To use this configuration layer, update custom configuration file with:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#zig"
|
||||
```
|
||||
|
||||
## Key bindings
|
||||
|
||||
### Running current script
|
||||
|
||||
To running a zig file, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
|
@ -60,6 +60,7 @@
|
||||
| Swift | [lang#swift](https://spacevim.org/layers/lang/swift/) |
|
||||
| Tcl | [lang#tcl](https://spacevim.org/layers/lang/tcl/) |
|
||||
| TypeScript | [lang#typescript](https://spacevim.org/layers/lang/typescript/) |
|
||||
| zig | [lang#zig](https://spacevim.org/layers/lang/zig/) |
|
||||
| 4th Dimension | |
|
||||
| ABAP | |
|
||||
| ABC | |
|
||||
@ -276,6 +277,5 @@
|
||||
- chapel-lang/chapel
|
||||
- lucee/Lucee
|
||||
- eclipse/golo-lang
|
||||
- ziglang/zig
|
||||
- HaxeFoundation/haxe
|
||||
- livecode/livecode
|
||||
|
Loading…
x
Reference in New Issue
Block a user