1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:20:05 +08:00

Add lang#swift layer (#2027)

This commit is contained in:
Wang Shidong 2018-08-08 20:56:51 +08:00 committed by GitHub
parent d4ce2c0534
commit 9f9c9c3d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,24 @@
"=============================================================================
" swift.vim --- swift layer for SpaceVim
" Copyright (c) 2016-2017 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
func! SpaceVim#layers#lang#swift#plugins() abort
let plugins = []
call add(plugins, ['keith/swift.vim', {'merged' : 0}])
call add(plugins, ['mitsuse/autocomplete-swift', {'merged' : 0}])
return plugins
endf
function! SpaceVim#layers#lang#swift#config() abort
call SpaceVim#mapping#space#regesit_lang_mappings('swift', function('s:language_specified_mappings'))
endfunction
function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','k'],
\ '<Plug>(autocomplete_swift_jump_to_placeholder)',
\ 'jumping to placeholders', 0)
endfunction

View File

@ -87,6 +87,7 @@ enable = false
| [lang#php](lang/php/) | This layer adds PHP language support to SpaceVim |
| [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. |
| [lang#swift](lang/swift/) | swift language support for SpaceVim, includes code completion, syntax highlighting |
| [lang#typescript](lang/typescript/) | This layer is for TypeScript development |
| [lang#vim](lang/vim/) | This layer is for writting vim script, including code completion, syntax checking and buffer formatting |
| [lsp](language-server-protocol/) | This layers provides language server protocol for vim and neovim |

39
docs/layers/lang/swift.md Normal file
View File

@ -0,0 +1,39 @@
---
title: "SpaceVim lang#swift layer"
description: "swift language support for SpaceVim, includes code completion, syntax highlighting"
---
# [Available Layers](../../) >> lang#swift
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Features](#features)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is for swift development in SpaceVim.
## Install
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#swift"
```
## Features
- auto-completion
- syntax checking
## Key bindings
| Key binding | Description |
| ----------- | ----------------------- |
| `SPC l k` | jumping to placeholders |

View File

@ -19,6 +19,7 @@ The next release is v0.9.0.
- Add lang#dockerfile layer ([#2001](https://github.com/SpaceVim/SpaceVim/pull/2001))
- Add lang#agda layer ([#1941](https://github.com/SpaceVim/SpaceVim/pull/1941))
- Add lang#autohotkey layer ([#2021](https://github.com/SpaceVim/SpaceVim/pull/2021))
- Add lang#swift layer ([#2027](https://github.com/SpaceVim/SpaceVim/pull/2027))
### Improvement