Перешел на lazy nvim, навел порядок в плагинах
This commit is contained in:
parent
91873ed81a
commit
446d2716e7
25 changed files with 790 additions and 469 deletions
23
nvim/snippets/go.json
Normal file
23
nvim/snippets/go.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"package line": {
|
||||
"body": ["package ${TM_DIRECTORY/.+\\/(.+)$/${1:/downcase}/}", "", "$0"],
|
||||
"description": "package header",
|
||||
"prefix": "pkg"
|
||||
},
|
||||
"structure constructor": {
|
||||
"body": [
|
||||
"// New$1 returns new $1.",
|
||||
"func New${1:type}(${2}) *$1 {",
|
||||
"\t$3",
|
||||
"\treturn &$1{$4}",
|
||||
"}"
|
||||
],
|
||||
"description": "constructor for structure type",
|
||||
"prefix": "construct"
|
||||
},
|
||||
"if err := ...; err != nil": {
|
||||
"prefix": "iferr",
|
||||
"body": "if err := ${1}; err != nil {\n\t${2:return ${3:nil, }${4:err}}\n}",
|
||||
"description": "Snippet for if err := ...; err != nil"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue