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

docs(format): format documentation text

This commit is contained in:
wsdjeg 2022-05-27 11:50:39 +08:00
parent 50a93380d3
commit 1efbd9998d

View File

@ -8,8 +8,8 @@ description: "This layer is for golang development. It also provides additional
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Features](#features)
- [Install](#install)
- [Layer options](#layer-options)
- [Key bindings](#key-bindings)
@ -19,6 +19,13 @@ description: "This layer is for golang development. It also provides additional
This layer is for [golang](https://go.dev/) development. It also provides additional language-specific key mappings.
## Features
- auto-completion
- syntax checking
- goto definition
- reference finder
## Install
To use this configuration layer, update your custom configuration file with:
@ -36,13 +43,6 @@ To enable tagbar support, you need to install [gotags](https://github.com/jstemm
go install github.com/jstemmer/gotags@latest
```
## Features
- auto-completion
- syntax checking
- goto definition
- reference finder
## Layer options
1. `enabled_linters`: set a list of enabled lint for golang. by default this
@ -50,12 +50,12 @@ go install github.com/jstemmer/gotags@latest
2. go_file_head: the default file head for golang source code.
```
[layers]
name = "lang#go"
go_file_head = [
'#!/usr/bin/python3',
'# -*- coding : utf-8 -*-'
''
[[layers]]
name = "lang#go"
go_file_head = [
'#!/usr/bin/python3',
'# -*- coding : utf-8 -*-'
''
]
```
@ -63,8 +63,8 @@ go_file_head = [
```
[[layers]]
name = 'lang#go'
go_interpreter = '~/download/bin/go'
name = 'lang#go'
go_interpreter = '~/download/bin/go'
```
4. format_on_save: enable/disable code formation when save go file. This
@ -72,8 +72,8 @@ go_interpreter = '~/download/bin/go'
```
[[layers]]
name = 'lang#go'
format_on_save = true
name = 'lang#go'
format_on_save = true
```
## Key bindings
@ -106,7 +106,7 @@ format_on_save = true
**Code formatting:**
the default key bindings for formatting current buffer is `SPC b f`, and this key bindings is defined in [format layer](). You can also use `g=` to indent current buffer.
the default key bindings for formatting current buffer is `SPC b f`, and this key bindings is defined in [format layer](../../format/). You can also use `g=` to indent current buffer.
To make neoformat support go files, you should have [go-fmt](http://golang.org/cmd/gofmt/) command available, or
install [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports). `go-fmt` is delivered by golang's default installation, so make sure you have correctly setup your go environment.