1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-13 13:10:39 +08:00

Add option for lang#zig layer

- ztagsbin: special the path of ztags
This commit is contained in:
Shidong Wang 2020-02-18 12:29:10 +08:00
parent e3344fa308
commit 381de00e4e
3 changed files with 19 additions and 0 deletions

View File

@ -6,6 +6,11 @@
" License: GPLv3
"=============================================================================
if exists('s:ztagsbin')
finish
endif
let s:ztagsbin = 'ztags'
function! SpaceVim#layers#lang#zig#plugins() abort
let plugins = []
call add(plugins, ['ziglang/zig.vim', { 'merged' : 0}])
@ -20,3 +25,7 @@ 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
function! SpaceVim#layers#lang#zig#set_variable(opt) abort
let s:ztagsbin = get(a:opt, 'ztagsbin', s:ztagsbin)
endfunction

View File

@ -10,6 +10,7 @@ lang: zh
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [模块选项](#模块选项)
- [快捷键](#快捷键)
- [运行当前脚本](#运行当前脚本)
@ -28,6 +29,10 @@ lang: zh
name = "lang#zig"
```
## 模块选项
- `ztagsbin`:制定 ztags 命令的路径。
## 快捷键
### 运行当前脚本

View File

@ -9,6 +9,7 @@ description: "This layer is for zig development, provide code runner support for
- [Description](#description)
- [Install](#install)
- [Options](#options)
- [Key bindings](#key-bindings)
- [Running current script](#running-current-script)
@ -27,6 +28,10 @@ To use this configuration layer, update custom configuration file with:
name = "lang#zig"
```
## Options
- `ztagsbin`: specific the path of ztags.
## Key bindings
### Running current script