forked from honza/vim-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add message and field snippets for proto filetype
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
priority -50 | ||
|
||
snippet mess "Proto message" b | ||
// ${2:TODO(`whoami`): Describe this message.} | ||
message ${1:Name} { | ||
|
||
// Next available id: 1 | ||
} | ||
endsnippet | ||
|
||
snippet reqf "Required field" b | ||
// ${4:TODO(`whoami`): Describe this field.} | ||
optional ${1:type} ${2:name} = ${3:1}; // Required | ||
endsnippet | ||
|
||
snippet optf "Optional field" b | ||
// ${4:TODO(`whoami`): Describe this field.} | ||
optional ${1:type} ${2:name} = ${3:1}; | ||
endsnippet | ||
|
||
snippet repf "Repeated field" b | ||
// ${4:TODO(`whoami`): Describe this field.} | ||
repeated ${1:type} ${2:name} = ${3:1}; | ||
endsnippet | ||
|
||
snippet enum "Enumeration" b | ||
// ${2:TODO(`whoami`): Describe this enum.} | ||
enum ${1:Name} { | ||
} | ||
endsnippet |