From 1efbd9998d764446cd275b81a797084ef51fe4a5 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Fri, 27 May 2022 11:50:39 +0800 Subject: [PATCH] docs(format): format documentation text --- docs/layers/lang/go.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/layers/lang/go.md b/docs/layers/lang/go.md index 61ae5bebc..99a365652 100644 --- a/docs/layers/lang/go.md +++ b/docs/layers/lang/go.md @@ -8,8 +8,8 @@ description: "This layer is for golang development. It also provides additional - [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.