Skip to content

Commit 76a4d7e

Browse files
committed
Add message and field snippets for proto filetype
1 parent 8770132 commit 76a4d7e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

UltiSnips/proto.snippets

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
priority -50
2+
3+
snippet mess "Proto message" b
4+
// ${2:TODO(`whoami`): Describe this message.}
5+
message ${1:Name} {
6+
7+
// Next available id: 1
8+
}
9+
endsnippet
10+
11+
snippet reqf "Required field" b
12+
// ${4:TODO(`whoami`): Describe this field.}
13+
optional ${1:type} ${2:name} = ${3:1}; // Required
14+
endsnippet
15+
16+
snippet optf "Optional field" b
17+
// ${4:TODO(`whoami`): Describe this field.}
18+
optional ${1:type} ${2:name} = ${3:1};
19+
endsnippet
20+
21+
snippet repf "Repeated field" b
22+
// ${4:TODO(`whoami`): Describe this field.}
23+
repeated ${1:type} ${2:name} = ${3:1};
24+
endsnippet
25+
26+
snippet enum "Enumeration" b
27+
// ${2:TODO(`whoami`): Describe this enum.}
28+
enum ${1:Name} {
29+
}
30+
endsnippet

0 commit comments

Comments
 (0)