Skip to content

chore: move hover docs to separate markdown files #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/workspace/docs/builtin/bool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*bool* builtin type, A Boolean value: `true` or `false`.

---
Encoded as a single byte: `0x00` or `0xff` (all non-zero bytes decode to `true`)
5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/bytes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*bytes* builtin type, A blob of arbitrary bytes.

---
Stores at most 4GB of binary data. Encoded as base64 in JSON.

7 changes: 7 additions & 0 deletions src/workspace/docs/builtin/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*default* builtin type, A magic option that specifies the field's default value.

---

Unlike every other option on a field, this does not have a corresponding field in
`google.protobuf.FieldOptions`; it is implemented by compiler magic.

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*double* builtin type,

---
A double-precision floating point number (IEEE-745.2008 binary64).

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/fixed32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*fixed32* builtin type, A 32-bit unsigned integer (4-byte encoding)

---
Values of this type range between `0` and `4294967295`.

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/fixed64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*fixed64* builtin type, A 64-bit unsigned integer (8-byte encoding)

---
Values of this type range between `0` and `18446744073709551615`.

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*float* builtin type

---
A single-precision floating point number (IEEE-745.2008 binary32).

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/int32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*int32* builtin type, A 32-bit integer (varint encoding)

---
Values of this type range between `-2147483648` and `2147483647`.
Beware that negative values are encoded as five bytes on the wire!
5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/int64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*int64* builtin type, A 64-bit integer (varint encoding)

---
Values of this type range between `-9223372036854775808` and `9223372036854775807`.
Beware that negative values are encoded as ten bytes on the wire!
5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/sfixed32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*sfixed32* builtin type, A 32-bit integer (4-byte encoding)

---
Values of this type range between `-2147483648` and `2147483647`.

4 changes: 4 additions & 0 deletions src/workspace/docs/builtin/sfixed64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*sfixed64* builtin type, A 64-bit integer (8-byte encoding)

---
Values of this type range between `-9223372036854775808` and `9223372036854775807`.
5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/sint32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*sint32* builtin type, A 32-bit integer (ZigZag encoding)

---
Values of this type range between `-2147483648` and `2147483647`.

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/sint64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*sint64* builtin type, A 64-bit integer (ZigZag encoding)

---
Values of this type range between `-9223372036854775808` and `9223372036854775807`.

4 changes: 4 additions & 0 deletions src/workspace/docs/builtin/string.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*string* builtin type, A string of text.

---
Stores at most 4GB of text. Intended to be UTF-8 encoded Unicode; use `bytes` if you need other encodings.
5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/uint32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*uint32* builtin type, A 32-bit unsigned integer (varint encoding)

---
Values of this type range between `0` and `4294967295`.

5 changes: 5 additions & 0 deletions src/workspace/docs/builtin/uint64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*uint64* builtin type, A 64-bit unsigned integer (varint encoding)

---
Values of this type range between `0` and `18446744073709551615`.

11 changes: 11 additions & 0 deletions src/workspace/docs/wellknown/Any.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*google.protobuf.Any* wellknown type
---
`Any` contains an arbitrary serialized message along with a URL that describes the type of the serialized message.
The JSON representation of an Any value uses the regular representation of the deserialized, embedded message, with an additional field @type which contains the type URL.
---
```proto
message Any {
string type_url = 1; // A URL/resource name that uniquely identifies the type of the serialized protocol buffer message
bytes value = 2; // Must be a valid serialized protocol buffer
}
```
15 changes: 15 additions & 0 deletions src/workspace/docs/wellknown/Api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*google.protobuf.Api* well known type
---
`Api` is a light-weight descriptor for a protocol buffer service.
---
```proto
message Api {
string name = 1; // The fully qualified name of this api, including package name followed by the api's simple name
repeated Method methods = 2; // The methods of this api, in unspecified order
repeated Option options = 3; // Any metadata attached to the API
string version = 4; // A version string fo this interface
SourceContext source_context = 5; // Source context for the protocol buffer service
repeated Mixin mixins = 6; // Included interfaces
Syntax syntax = 7; // Source syntax of the service
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/BoolValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.BoolValue* well known type, Wrapper message for bool
---
The JSON representation for `BoolValue` is JSON `true` and `false`
---
```proto
message BoolValue {
bool value = 1;
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/BytesValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.BytesValue* well known type, Wrapper message for bytes
---
The JSON representation for `BytesValue` is JSON string.
---
```proto
message BytesValue {
bytes value = 1;
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/DoubleValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.DoubleValue* well known type, Wrapper message for `double`
---
The JSON representation for `DoubleValue` is JSON number.
---
```proto
message DoubleValue {
double value = 1;
}
```
13 changes: 13 additions & 0 deletions src/workspace/docs/wellknown/Duration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*google.protobuf.Duration* well known type
---
A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution.
It is independent of any calendar and concepts like "day" or "month".
It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp.
Range is approximately +-10,000 years.
---
```proto
message Duration {
int64 seconds = 1; // Signed seconds of the span of time Must be from -315,576,000,000 to +315,576,000,000 inclusive
int32 nanos = 2; // Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field.
}
```
4 changes: 4 additions & 0 deletions src/workspace/docs/wellknown/Empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*google.protobuf.Empty* well known type
---
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs.
The JSON representation for Empty is empty JSON object `{}`
14 changes: 14 additions & 0 deletions src/workspace/docs/wellknown/Enum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*google.protobuf.Enum* well known type
---
Enum type definition
---
```proto
message Enum {
string name = 1; // Enum type name.
repeated EnumValue enumvalue = 2; // Enum value definitions.
repeated Option options = 3; // Protocol buffer options.
SourceContext source_context = 4; // The source context.
Syntax syntax = 5; // The source syntax.
string edition = 6; // The source edition string, only valid when syntax is SYNTAX_EDITIONS.
}
```
11 changes: 11 additions & 0 deletions src/workspace/docs/wellknown/EnumValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*google.protobuf.EnumValue* well known type
---
Enum value definition
---
```proto
message EnumValue {
string name = 1; // Enum value name.
int32 number = 2; // Enum value number.
repeated Option options = 3; // Protocol buffer options.
}
```
12 changes: 12 additions & 0 deletions src/workspace/docs/wellknown/Field.Cardinality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*google.protobuf.Field.Cardinality* well known type
---
Whether a field is optional, required, or repeated.
---
```proto
enum Cardinality {
CARDINALITY_UNKNOWN = 0; // For fields with unknown cardinality.
CARDINALITY_OPTIONAL = 1; // For optional fields.
CARDINALITY_REQUIRED = 2; // For required fields. Proto2 syntax only.
CARDINALITY_REPEATED = 3; // For repeated fields.
}
```
27 changes: 27 additions & 0 deletions src/workspace/docs/wellknown/Field.Kind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*google.protobuf.Field.Kind* well known type
---
Basic field types.
---
```proto
enum Kind {
TYPE_UNKNOWN = 0; // Field type unknown.
TYPE_DOUBLE = 1; // Field type double.
TYPE_FLOAT = 2; // Field type float.
TYPE_INT64 = 3; // Field type int64.
TYPE_UINT64 = 4; // Field type uint64.
TYPE_INT32 = 5; // Field type int32.
TYPE_FIXED64 = 6; // Field type fixed64.
TYPE_FIXED32 = 7; // Field type fixed32.
TYPE_BOOL = 8; // Field type bool.
TYPE_STRING = 9; // Field type string.
TYPE_GROUP = 10; // Field type group. Proto2 syntax only, and deprecated.
TYPE_MESSAGE = 11; // Field type message.
TYPE_BYTES = 12; // Field type bytes.
TYPE_UINT32 = 13; // Field type uint32.
TYPE_ENUM = 14; // Field type enum.
TYPE_SFIXED32 = 15; // Field type sfixed32.
TYPE_SFIXED64 = 16; // Field type sfixed64.
TYPE_SINT32 = 17; // Field type sint32.
TYPE_SINT64 = 18; // Field type sint64.
}
```
18 changes: 18 additions & 0 deletions src/workspace/docs/wellknown/Field.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*google.protobuf.Field* well known type
---
A single field of a message type.
---
```proto
message Field {
Kind kind = 1; // The field type.
Cardinality cardinality = 2; // The field cardinality.
int32 number = 3; // The field number.
string name = 4; // The field name.
string type_url = 6; // The field type URL, without the scheme, for message or enumeration types
int32 oneof_index = 7; // The index of the field type in `Type.oneofs`, for message or enumeration types.
bool packed = 8; // Whether to use alternative packed wire representation.
repeated Option options = 9; // The protocol buffer options.
string json_name = 10; // The field JSON name.
string default_value = 11; // The string value of the default value of this field. Proto2 syntax only.
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/FieldMask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.FieldMask* well known type
---
`FieldMask` represents a set of symbolic field paths
---
```proto
message FieldMask {
repeated string paths = 1; // The set of field mask paths.
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/FloatValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.FloatValue* well known type, Wrapper message for `float`
---
The JSON representation for `FloatValue` is JSON number.
---
```proto
message FloatValue {
float value = 1;
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/Int32Value.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.Int32Value* well known type, Wrapper message for `int32`
---
The JSON representation for `Int32Value` is JSON number.
---
```proto
message Int32Value {
int32 value = 1;
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/Int64Value.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.Int64Value* well known type, Wrapper message for `int64`
---
The JSON representation for `Int64Value` is JSON string
---
```proto
message Int64Value {
int64 value = 1;
}
```
10 changes: 10 additions & 0 deletions src/workspace/docs/wellknown/ListValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*google.protobuf.ListValue* well known type
---
`ListValue` is a wrapper around a repeated field of values.
The JSON representation for `ListValue` is JSON array.
---
```proto
message ListValue {
repeated Value values = 1; // Repeated field of dynamically typed values.
}
```
15 changes: 15 additions & 0 deletions src/workspace/docs/wellknown/Method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*google.protobuf.Method* well known type
---
Method represents a method of an API interface.
---
```proto
message Method {
string name = 1; // The simple name of this method.
string request_type_url = 2; // A URL of the input message type.
bool request_streaming = 3; // If true, the request is streamed.
string response_type_url = 4; // The URL of the output message type.
bool response_streaming = 5; // If true, the response is streamed.
repeated Option options = 6; // Any metadata attached to the method.
Syntax syntax = 7; // The source syntax of this method.
}
```
10 changes: 10 additions & 0 deletions src/workspace/docs/wellknown/Mixin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*google.protobuf.Mixin* well known type
---
Declares an API Interface to be included in this interface.
---
```proto
message Mixin {
string name = 1; // The fully qualified name of the interface which is included.
string root = 2; // If non-empty specifies a path under which the interface is served.
}
```
10 changes: 10 additions & 0 deletions src/workspace/docs/wellknown/NullValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*google.protobuf.NullValue* well known type
---
`NullValue` is a singleton enumeration to represent the null value for the `Value` type union.
The JSON representation for `NullValue` is JSON `null`.
---
```proto
enum NullValue {
NULL_VALUE = 0; // Null value.
}
```
10 changes: 10 additions & 0 deletions src/workspace/docs/wellknown/Option.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*google.protobuf.Option* well known type
---
A protocol buffer option, which can be attached to a message, field, enumeration, etc.
---
```proto
message Option {
string name = 1; // The option's name. For example, "java_package".
Any value = 2; // The option's value. For example, "com.google.protobuf".
}
```
9 changes: 9 additions & 0 deletions src/workspace/docs/wellknown/SourceContext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*google.protobuf.SourceContext* well known type
---
`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.
---
```proto
message SourceContext {
string file_name = 1; // The path-qualified name of the .proto file that contained the associated protobuf element.
}
```
Loading