Extract Protocol Buffers support into an extension (#18704)
This PR extracts the Protocol Buffers support into an extension. Release Notes: - Removed built-in support for Protocol Buffers, in favor of making it available as an extension. The Protocol Buffers extension will be suggested for download when you open a `.proto` file.
This commit is contained in:
parent
8c95b8d89a
commit
cddd7875a4
9 changed files with 13 additions and 16 deletions
11
extensions/proto/extension.toml
Normal file
11
extensions/proto/extension.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
id = "proto"
|
||||
name = "Proto"
|
||||
description = "Protocol Buffers support."
|
||||
version = "0.1.0"
|
||||
schema_version = 1
|
||||
authors = ["Zed Industries <support@zed.dev>"]
|
||||
repository = "https://github.com/zed-industries/zed"
|
||||
|
||||
[grammars.proto]
|
||||
repository = "https://github.com/zed-industries/tree-sitter-proto"
|
||||
commit = "0848bd30a64be48772e15fbb9d5ba8c0cc5772ad"
|
13
extensions/proto/languages/proto/config.toml
Normal file
13
extensions/proto/languages/proto/config.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
name = "Proto"
|
||||
grammar = "proto"
|
||||
path_suffixes = ["proto"]
|
||||
line_comments = ["// "]
|
||||
autoclose_before = ";:.,=}])>"
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "(", end = ")", close = true, newline = true },
|
||||
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["comment", "string"] },
|
||||
{ start = "'", end = "'", close = true, newline = false, not_in = ["comment", "string"] },
|
||||
{ start = "/*", end = " */", close = true, newline = false, not_in = ["comment", "string"] },
|
||||
]
|
61
extensions/proto/languages/proto/highlights.scm
Normal file
61
extensions/proto/languages/proto/highlights.scm
Normal file
|
@ -0,0 +1,61 @@
|
|||
[
|
||||
"syntax"
|
||||
"package"
|
||||
"option"
|
||||
"optional"
|
||||
"import"
|
||||
"service"
|
||||
"rpc"
|
||||
"returns"
|
||||
"message"
|
||||
"enum"
|
||||
"oneof"
|
||||
"repeated"
|
||||
"reserved"
|
||||
"to"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(key_type)
|
||||
(type)
|
||||
(message_name)
|
||||
(enum_name)
|
||||
(service_name)
|
||||
(rpc_name)
|
||||
(message_or_enum_type)
|
||||
] @type
|
||||
|
||||
(enum_field
|
||||
(identifier) @constant)
|
||||
|
||||
[
|
||||
(string)
|
||||
"\"proto3\""
|
||||
] @string
|
||||
|
||||
(int_lit) @number
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @boolean
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
";"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
"=" @operator
|
19
extensions/proto/languages/proto/outline.scm
Normal file
19
extensions/proto/languages/proto/outline.scm
Normal file
|
@ -0,0 +1,19 @@
|
|||
(message
|
||||
"message" @context
|
||||
(message_name
|
||||
(identifier) @name)) @item
|
||||
|
||||
(service
|
||||
"service" @context
|
||||
(service_name
|
||||
(identifier) @name)) @item
|
||||
|
||||
(rpc
|
||||
"rpc" @context
|
||||
(rpc_name
|
||||
(identifier) @name)) @item
|
||||
|
||||
(enum
|
||||
"enum" @context
|
||||
(enum_name
|
||||
(identifier) @name)) @item
|
Loading…
Add table
Add a link
Reference in a new issue