From 6e015998a70c02341c35b573dcab3e0355c28db2 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Thu, 14 Nov 2024 10:23:03 -0500 Subject: [PATCH] chore: Add formatter for proto. Format zed.proto --- .zed/settings.json | 9 ++++++ crates/proto/proto/zed.proto | 57 ++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/.zed/settings.json b/.zed/settings.json index 41adfdbf59..9f34e513df 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -30,6 +30,15 @@ "tab_size": 2, "formatter": "prettier" }, + "Proto": { + "tab_size": 4, + "formatter": { + "external": { + "command": "clang-format", + "arguments": ["-style={IndentWidth: 4, ColumnLimit: 0}"] + } + } + }, "Rust": { "tasks": { "variables": { diff --git a/crates/proto/proto/zed.proto b/crates/proto/proto/zed.proto index b86894bae1..551b94ee60 100644 --- a/crates/proto/proto/zed.proto +++ b/crates/proto/proto/zed.proto @@ -644,10 +644,10 @@ message UpdateChannelBufferCollaborators { } message GetDefinition { - uint64 project_id = 1; - uint64 buffer_id = 2; - Anchor position = 3; - repeated VectorClockEntry version = 4; + uint64 project_id = 1; + uint64 buffer_id = 2; + Anchor position = 3; + repeated VectorClockEntry version = 4; } message GetDefinitionResponse { @@ -655,10 +655,10 @@ message GetDefinitionResponse { } message GetDeclaration { - uint64 project_id = 1; - uint64 buffer_id = 2; - Anchor position = 3; - repeated VectorClockEntry version = 4; + uint64 project_id = 1; + uint64 buffer_id = 2; + Anchor position = 3; + repeated VectorClockEntry version = 4; } message GetDeclarationResponse { @@ -666,43 +666,43 @@ message GetDeclarationResponse { } message GetTypeDefinition { - uint64 project_id = 1; - uint64 buffer_id = 2; - Anchor position = 3; - repeated VectorClockEntry version = 4; - } + uint64 project_id = 1; + uint64 buffer_id = 2; + Anchor position = 3; + repeated VectorClockEntry version = 4; +} message GetTypeDefinitionResponse { repeated LocationLink links = 1; } message GetImplementation { - uint64 project_id = 1; - uint64 buffer_id = 2; - Anchor position = 3; - repeated VectorClockEntry version = 4; - } + uint64 project_id = 1; + uint64 buffer_id = 2; + Anchor position = 3; + repeated VectorClockEntry version = 4; +} message GetImplementationResponse { repeated LocationLink links = 1; } message GetReferences { - uint64 project_id = 1; - uint64 buffer_id = 2; - Anchor position = 3; - repeated VectorClockEntry version = 4; - } + uint64 project_id = 1; + uint64 buffer_id = 2; + Anchor position = 3; + repeated VectorClockEntry version = 4; +} message GetReferencesResponse { repeated Location locations = 1; } message GetDocumentHighlights { - uint64 project_id = 1; - uint64 buffer_id = 2; - Anchor position = 3; - repeated VectorClockEntry version = 4; - } + uint64 project_id = 1; + uint64 buffer_id = 2; + Anchor position = 3; + repeated VectorClockEntry version = 4; +} message GetDocumentHighlightsResponse { repeated DocumentHighlight highlights = 1; @@ -1041,7 +1041,6 @@ message OnTypeFormattingResponse { Transaction transaction = 1; } - message LinkedEditingRange { uint64 project_id = 1; uint64 buffer_id = 2;