1syntax = "proto3";
2package zed.messages;
3
4import "buffer.proto";
5
6message GetDefinition {
7 uint64 project_id = 1;
8 uint64 buffer_id = 2;
9 Anchor position = 3;
10 repeated VectorClockEntry version = 4;
11}
12
13message GetDefinitionResponse {
14 repeated LocationLink links = 1;
15}
16
17message GetDeclaration {
18 uint64 project_id = 1;
19 uint64 buffer_id = 2;
20 Anchor position = 3;
21 repeated VectorClockEntry version = 4;
22}
23
24message GetDeclarationResponse {
25 repeated LocationLink links = 1;
26}
27
28message GetTypeDefinition {
29 uint64 project_id = 1;
30 uint64 buffer_id = 2;
31 Anchor position = 3;
32 repeated VectorClockEntry version = 4;
33}
34
35message GetTypeDefinitionResponse {
36 repeated LocationLink links = 1;
37}
38message GetImplementation {
39 uint64 project_id = 1;
40 uint64 buffer_id = 2;
41 Anchor position = 3;
42 repeated VectorClockEntry version = 4;
43}
44
45message GetImplementationResponse {
46 repeated LocationLink links = 1;
47}
48
49message GetReferences {
50 uint64 project_id = 1;
51 uint64 buffer_id = 2;
52 Anchor position = 3;
53 repeated VectorClockEntry version = 4;
54}
55
56message GetReferencesResponse {
57 repeated Location locations = 1;
58}
59
60message GetDocumentHighlights {
61 uint64 project_id = 1;
62 uint64 buffer_id = 2;
63 Anchor position = 3;
64 repeated VectorClockEntry version = 4;
65}
66
67message GetDocumentHighlightsResponse {
68 repeated DocumentHighlight highlights = 1;
69}
70
71message LocationLink {
72 optional Location origin = 1;
73 Location target = 2;
74}
75
76message DocumentHighlight {
77 Kind kind = 1;
78 Anchor start = 2;
79 Anchor end = 3;
80
81 enum Kind {
82 Text = 0;
83 Read = 1;
84 Write = 2;
85 }
86}
87
88message GetProjectSymbols {
89 uint64 project_id = 1;
90 string query = 2;
91}
92
93message GetProjectSymbolsResponse {
94 repeated Symbol symbols = 4;
95}
96
97message Symbol {
98 uint64 source_worktree_id = 1;
99 uint64 worktree_id = 2;
100 string language_server_name = 3;
101 string name = 4;
102 int32 kind = 5;
103 string path = 6;
104 // Cannot use generate anchors for unopened files,
105 // so we are forced to use point coords instead
106 PointUtf16 start = 7;
107 PointUtf16 end = 8;
108 bytes signature = 9;
109 uint64 language_server_id = 10;
110 optional string container_name = 11;
111}
112
113message GetDocumentSymbols {
114 uint64 project_id = 1;
115 uint64 buffer_id = 2;
116 repeated VectorClockEntry version = 3;
117}
118
119message GetDocumentSymbolsResponse {
120 repeated DocumentSymbol symbols = 1;
121}
122
123message DocumentSymbol {
124 string name = 1;
125 int32 kind = 2;
126 // Cannot use generate anchors for unopened files,
127 // so we are forced to use point coords instead
128 PointUtf16 start = 3;
129 PointUtf16 end = 4;
130 PointUtf16 selection_start = 5;
131 PointUtf16 selection_end = 6;
132 repeated DocumentSymbol children = 7;
133}
134
135message InlayHints {
136 uint64 project_id = 1;
137 uint64 buffer_id = 2;
138 Anchor start = 3;
139 Anchor end = 4;
140 repeated VectorClockEntry version = 5;
141}
142
143message InlayHintsResponse {
144 repeated InlayHint hints = 1;
145 repeated VectorClockEntry version = 2;
146}
147
148message SemanticTokens {
149 uint64 project_id = 1;
150 uint64 buffer_id = 2;
151 optional uint64 for_server = 3;
152 repeated VectorClockEntry version = 4;
153}
154
155message SemanticTokensResponse {
156 // Only `data` or `edits` may be set.
157 // `oneof` does not allow `repeated` fields.
158 repeated uint32 data = 1;
159 repeated SemanticTokensEdit edits = 2;
160 optional string result_id = 3;
161 repeated VectorClockEntry version = 4;
162}
163
164message SemanticTokensEdit {
165 uint32 start = 1;
166 uint32 delete_count = 2;
167 repeated uint32 data = 3;
168}
169
170message RefreshSemanticTokens {
171 uint64 project_id = 1;
172 uint64 server_id = 2;
173 optional uint64 request_id = 3;
174}
175
176message PointUtf16 {
177 uint32 row = 1;
178 uint32 column = 2;
179}
180
181message LspExtExpandMacro {
182 uint64 project_id = 1;
183 uint64 buffer_id = 2;
184 Anchor position = 3;
185}
186
187message LspExtExpandMacroResponse {
188 string name = 1;
189 string expansion = 2;
190}
191
192message LspExtOpenDocs {
193 uint64 project_id = 1;
194 uint64 buffer_id = 2;
195 Anchor position = 3;
196}
197
198message LspExtOpenDocsResponse {
199 optional string web = 1;
200 optional string local = 2;
201}
202
203message LspExtSwitchSourceHeader {
204 uint64 project_id = 1;
205 uint64 buffer_id = 2;
206}
207
208message LspExtSwitchSourceHeaderResponse {
209 string target_file = 1;
210}
211
212message LspExtGoToParentModule {
213 uint64 project_id = 1;
214 uint64 buffer_id = 2;
215 Anchor position = 3;
216}
217
218message LspExtGoToParentModuleResponse {
219 repeated LocationLink links = 1;
220}
221
222message GetCompletionsResponse {
223 repeated Completion completions = 1;
224 repeated VectorClockEntry version = 2;
225 // `!is_complete`, inverted for a default of `is_complete = true`
226 bool can_reuse = 3;
227}
228
229message ApplyCompletionAdditionalEdits {
230 uint64 project_id = 1;
231 uint64 buffer_id = 2;
232 Completion completion = 3;
233 repeated AnchorRange all_commit_ranges = 4;
234}
235
236message ApplyCompletionAdditionalEditsResponse {
237 Transaction transaction = 1;
238}
239
240message Completion {
241 Anchor old_replace_start = 1;
242 Anchor old_replace_end = 2;
243 string new_text = 3;
244 uint64 server_id = 4;
245 bytes lsp_completion = 5;
246 bool resolved = 6;
247 Source source = 7;
248 optional bytes lsp_defaults = 8;
249 optional Anchor buffer_word_start = 9;
250 optional Anchor buffer_word_end = 10;
251 Anchor old_insert_start = 11;
252 Anchor old_insert_end = 12;
253 optional string sort_text = 13;
254
255 enum Source {
256 Lsp = 0;
257 Custom = 1;
258 BufferWord = 2;
259 Dap = 3;
260 }
261}
262
263message GetCodeActions {
264 uint64 project_id = 1;
265 uint64 buffer_id = 2;
266 Anchor start = 3;
267 Anchor end = 4;
268 repeated VectorClockEntry version = 5;
269}
270
271message GetCodeActionsResponse {
272 repeated CodeAction actions = 1;
273 repeated VectorClockEntry version = 2;
274}
275
276message GetSignatureHelp {
277 uint64 project_id = 1;
278 uint64 buffer_id = 2;
279 Anchor position = 3;
280 repeated VectorClockEntry version = 4;
281}
282
283message GetSignatureHelpResponse {
284 optional SignatureHelp signature_help = 1;
285}
286
287message SignatureHelp {
288 repeated SignatureInformation signatures = 1;
289 optional uint32 active_signature = 2;
290 optional uint32 active_parameter = 3;
291}
292
293message SignatureInformation {
294 string label = 1;
295 optional Documentation documentation = 2;
296 repeated ParameterInformation parameters = 3;
297 optional uint32 active_parameter = 4;
298}
299
300message Documentation {
301 oneof content {
302 string value = 1;
303 MarkupContent markup_content = 2;
304 }
305}
306
307enum MarkupKind {
308 PlainText = 0;
309 Markdown = 1;
310}
311
312message ParameterInformation {
313 oneof label {
314 string simple = 1;
315 LabelOffsets label_offsets = 2;
316 }
317 optional Documentation documentation = 3;
318}
319
320message LabelOffsets {
321 uint32 start = 1;
322 uint32 end = 2;
323}
324
325message GetHover {
326 uint64 project_id = 1;
327 uint64 buffer_id = 2;
328 Anchor position = 3;
329 repeated VectorClockEntry version = 5;
330}
331
332message GetHoverResponse {
333 optional Anchor start = 1;
334 optional Anchor end = 2;
335 repeated HoverBlock contents = 3;
336}
337
338message HoverBlock {
339 string text = 1;
340 optional string language = 2;
341 bool is_markdown = 3;
342}
343
344message ApplyCodeAction {
345 uint64 project_id = 1;
346 uint64 buffer_id = 2;
347 CodeAction action = 3;
348}
349
350message ApplyCodeActionResponse {
351 ProjectTransaction transaction = 1;
352}
353
354message PrepareRename {
355 uint64 project_id = 1;
356 uint64 buffer_id = 2;
357 Anchor position = 3;
358 repeated VectorClockEntry version = 4;
359}
360
361message PrepareRenameResponse {
362 bool can_rename = 1;
363 Anchor start = 2;
364 Anchor end = 3;
365 repeated VectorClockEntry version = 4;
366 bool only_unprepared_rename_supported = 5;
367}
368
369message PerformRename {
370 uint64 project_id = 1;
371 uint64 buffer_id = 2;
372 Anchor position = 3;
373 string new_name = 4;
374 repeated VectorClockEntry version = 5;
375}
376
377message OnTypeFormatting {
378 uint64 project_id = 1;
379 uint64 buffer_id = 2;
380 Anchor position = 3;
381 string trigger = 4;
382 repeated VectorClockEntry version = 5;
383}
384
385message OnTypeFormattingResponse {
386 Transaction transaction = 1;
387}
388
389message LinkedEditingRange {
390 uint64 project_id = 1;
391 uint64 buffer_id = 2;
392 Anchor position = 3;
393 repeated VectorClockEntry version = 4;
394}
395
396message LinkedEditingRangeResponse {
397 repeated AnchorRange items = 1;
398 repeated VectorClockEntry version = 4;
399}
400
401message InlayHint {
402 Anchor position = 1;
403 InlayHintLabel label = 2;
404 optional string kind = 3;
405 bool padding_left = 4;
406 bool padding_right = 5;
407 InlayHintTooltip tooltip = 6;
408 ResolveState resolve_state = 7;
409}
410
411message InlayHintLabel {
412 oneof label {
413 string value = 1;
414 InlayHintLabelParts label_parts = 2;
415 }
416}
417
418message InlayHintLabelParts {
419 repeated InlayHintLabelPart parts = 1;
420}
421
422message InlayHintLabelPart {
423 string value = 1;
424 InlayHintLabelPartTooltip tooltip = 2;
425 optional string location_url = 3;
426 PointUtf16 location_range_start = 4;
427 PointUtf16 location_range_end = 5;
428 optional uint64 language_server_id = 6;
429}
430
431message InlayHintTooltip {
432 oneof content {
433 string value = 1;
434 MarkupContent markup_content = 2;
435 }
436}
437
438message InlayHintLabelPartTooltip {
439 oneof content {
440 string value = 1;
441 MarkupContent markup_content = 2;
442 }
443}
444
445message ResolveState {
446 State state = 1;
447 LspResolveState lsp_resolve_state = 2;
448
449 enum State {
450 Resolved = 0;
451 CanResolve = 1;
452 Resolving = 2;
453 }
454
455 message LspResolveState {
456 optional string value = 1;
457 uint64 server_id = 2;
458 }
459}
460
461// This type is used to resolve more than just
462// the documentation, but for backwards-compatibility
463// reasons we can't rename the type.
464message ResolveCompletionDocumentation {
465 uint64 project_id = 1;
466 uint64 language_server_id = 2;
467 bytes lsp_completion = 3;
468 uint64 buffer_id = 4;
469}
470
471message ResolveCompletionDocumentationResponse {
472 string documentation = 1;
473 bool documentation_is_markdown = 2;
474 Anchor old_replace_start = 3;
475 Anchor old_replace_end = 4;
476 string new_text = 5;
477 bytes lsp_completion = 6;
478 Anchor old_insert_start = 7;
479 Anchor old_insert_end = 8;
480}
481
482message ResolveInlayHint {
483 uint64 project_id = 1;
484 uint64 buffer_id = 2;
485 uint64 language_server_id = 3;
486 InlayHint hint = 4;
487}
488
489message ResolveInlayHintResponse {
490 InlayHint hint = 1;
491}
492
493message RefreshInlayHints {
494 uint64 project_id = 1;
495 uint64 server_id = 2;
496 optional uint64 request_id = 3;
497}
498
499message CodeLens {
500 bytes lsp_lens = 1;
501}
502
503message GetCodeLens {
504 uint64 project_id = 1;
505 uint64 buffer_id = 2;
506 repeated VectorClockEntry version = 3;
507}
508
509message GetCodeLensResponse {
510 repeated CodeAction lens_actions = 1;
511 repeated VectorClockEntry version = 2;
512}
513
514message RefreshCodeLens {
515 uint64 project_id = 1;
516}
517
518message MarkupContent {
519 bool is_markdown = 1;
520 string value = 2;
521}
522
523message PerformRenameResponse {
524 ProjectTransaction transaction = 2;
525}
526
527message CodeAction {
528 uint64 server_id = 1;
529 Anchor start = 2;
530 Anchor end = 3;
531 bytes lsp_action = 4;
532 Kind kind = 5;
533 bool resolved = 6;
534 enum Kind {
535 Action = 0;
536 Command = 1;
537 CodeLens = 2;
538 }
539}
540
541message LanguageServer {
542 uint64 id = 1;
543 string name = 2;
544 optional uint64 worktree_id = 3;
545}
546
547message StartLanguageServer {
548 uint64 project_id = 1;
549 LanguageServer server = 2;
550 string capabilities = 3;
551}
552
553message UpdateDiagnosticSummary {
554 uint64 project_id = 1;
555 uint64 worktree_id = 2;
556 DiagnosticSummary summary = 3;
557 repeated DiagnosticSummary more_summaries = 4;
558}
559
560message DiagnosticSummary {
561 string path = 1;
562 uint64 language_server_id = 2;
563 uint32 error_count = 3;
564 uint32 warning_count = 4;
565}
566
567message UpdateLanguageServer {
568 uint64 project_id = 1;
569 uint64 language_server_id = 2;
570 optional string server_name = 8;
571 oneof variant {
572 LspWorkStart work_start = 3;
573 LspWorkProgress work_progress = 4;
574 LspWorkEnd work_end = 5;
575 LspDiskBasedDiagnosticsUpdating disk_based_diagnostics_updating = 6;
576 LspDiskBasedDiagnosticsUpdated disk_based_diagnostics_updated = 7;
577 StatusUpdate status_update = 9;
578 RegisteredForBuffer registered_for_buffer = 10;
579 ServerMetadataUpdated metadata_updated = 11;
580 }
581}
582
583message ProgressToken {
584 oneof value {
585 int32 number = 1;
586 string string = 2;
587 }
588}
589
590message LspWorkStart {
591 reserved 1;
592 optional string title = 4;
593 optional string message = 2;
594 optional uint32 percentage = 3;
595 optional bool is_cancellable = 5;
596 ProgressToken token = 6;
597}
598
599message LspWorkProgress {
600 reserved 1;
601 optional string message = 2;
602 optional uint32 percentage = 3;
603 optional bool is_cancellable = 4;
604 ProgressToken token = 5;
605}
606
607message LspWorkEnd {
608 reserved 1;
609 ProgressToken token = 2;
610}
611
612message LspDiskBasedDiagnosticsUpdating {}
613
614message LspDiskBasedDiagnosticsUpdated {}
615
616message StatusUpdate {
617 optional string message = 1;
618 oneof status {
619 ServerBinaryStatus binary = 2;
620 ServerHealth health = 3;
621 }
622}
623
624enum ServerHealth {
625 OK = 0;
626 WARNING = 1;
627 ERROR = 2;
628}
629
630enum ServerBinaryStatus {
631 NONE = 0;
632 CHECKING_FOR_UPDATE = 1;
633 DOWNLOADING = 2;
634 STARTING = 3;
635 STOPPING = 4;
636 STOPPED = 5;
637 FAILED = 6;
638}
639
640message RegisteredForBuffer {
641 string buffer_abs_path = 1;
642 uint64 buffer_id = 2;
643}
644
645message LanguageServerBinaryInfo {
646 string path = 1;
647 repeated string arguments = 2;
648}
649
650message ServerMetadataUpdated {
651 optional string capabilities = 1;
652 optional LanguageServerBinaryInfo binary = 2;
653 optional string configuration = 3;
654 repeated string workspace_folders = 4;
655}
656
657message LanguageServerLog {
658 uint64 project_id = 1;
659 uint64 language_server_id = 2;
660 string message = 3;
661 oneof log_type {
662 LogMessage log = 4;
663 TraceMessage trace = 5;
664 RpcMessage rpc = 6;
665 }
666}
667
668message LogMessage {
669 LogLevel level = 1;
670
671 enum LogLevel {
672 LOG = 0;
673 INFO = 1;
674 WARNING = 2;
675 ERROR = 3;
676 }
677}
678
679message TraceMessage {
680 optional string verbose_info = 1;
681}
682
683message RpcMessage {
684 Kind kind = 1;
685
686 enum Kind {
687 RECEIVED = 0;
688 SENT = 1;
689 }
690}
691
692message LspLogTrace {
693 optional string message = 1;
694}
695
696message ApplyCodeActionKind {
697 uint64 project_id = 1;
698 string kind = 2;
699 repeated uint64 buffer_ids = 3;
700}
701
702message ApplyCodeActionKindResponse {
703 ProjectTransaction transaction = 1;
704}
705
706message RegisterBufferWithLanguageServers {
707 uint64 project_id = 1;
708 uint64 buffer_id = 2;
709 repeated LanguageServerSelector only_servers = 3;
710}
711
712enum FormatTrigger {
713 Save = 0;
714 Manual = 1;
715}
716
717message OpenBufferForSymbol {
718 uint64 project_id = 1;
719 Symbol symbol = 2;
720}
721
722message OpenBufferForSymbolResponse {
723 uint64 buffer_id = 1;
724}
725
726message BufferFormatRanges {
727 uint64 buffer_id = 1;
728 repeated AnchorRange ranges = 2;
729}
730
731message FormatBuffers {
732 uint64 project_id = 1;
733 FormatTrigger trigger = 2;
734 repeated uint64 buffer_ids = 3;
735 repeated BufferFormatRanges buffer_ranges = 4;
736}
737
738message FormatBuffersResponse {
739 ProjectTransaction transaction = 1;
740}
741
742message GetCompletions {
743 uint64 project_id = 1;
744 uint64 buffer_id = 2;
745 Anchor position = 3;
746 repeated VectorClockEntry version = 4;
747 optional uint64 server_id = 5;
748}
749
750message CancelLanguageServerWork {
751 uint64 project_id = 1;
752
753 oneof work {
754 Buffers buffers = 2;
755 LanguageServerWork language_server_work = 3;
756 }
757
758 message Buffers {
759 repeated uint64 buffer_ids = 2;
760 }
761
762 message LanguageServerWork {
763 uint64 language_server_id = 1;
764 reserved 2;
765 optional ProgressToken token = 3;
766 }
767}
768
769message LanguageServerPromptRequest {
770 uint64 project_id = 1;
771
772 oneof level {
773 Info info = 2;
774 Warning warning = 3;
775 Critical critical = 4;
776 }
777
778 message Info {}
779 message Warning {}
780 message Critical {}
781
782 string message = 5;
783 repeated string actions = 6;
784 string lsp_name = 7;
785}
786
787message LanguageServerPromptResponse {
788 optional uint64 action_response = 1;
789}
790
791message GetDocumentColor {
792 uint64 project_id = 1;
793 uint64 buffer_id = 2;
794 repeated VectorClockEntry version = 3;
795}
796
797message GetDocumentColorResponse {
798 repeated ColorInformation colors = 1;
799 repeated VectorClockEntry version = 2;
800}
801
802message ColorInformation {
803 PointUtf16 lsp_range_start = 1;
804 PointUtf16 lsp_range_end = 2;
805 float red = 3;
806 float green = 4;
807 float blue = 5;
808 float alpha = 6;
809}
810
811message GetColorPresentation {
812 uint64 project_id = 1;
813 uint64 buffer_id = 2;
814 ColorInformation color = 3;
815 uint64 server_id = 4;
816}
817
818message GetColorPresentationResponse {
819 repeated ColorPresentation presentations = 1;
820}
821
822message ColorPresentation {
823 string label = 1;
824 optional TextEdit text_edit = 2;
825 repeated TextEdit additional_text_edits = 3;
826}
827
828message TextEdit {
829 string new_text = 1;
830 PointUtf16 lsp_range_start = 2;
831 PointUtf16 lsp_range_end = 3;
832}
833
834message LspQuery {
835 uint64 project_id = 1;
836 uint64 lsp_request_id = 2;
837 optional uint64 server_id = 15;
838 oneof request {
839 GetReferences get_references = 3;
840 GetDocumentColor get_document_color = 4;
841 GetHover get_hover = 5;
842 GetCodeActions get_code_actions = 6;
843 GetSignatureHelp get_signature_help = 7;
844 GetCodeLens get_code_lens = 8;
845 GetDocumentDiagnostics get_document_diagnostics = 9;
846 GetDefinition get_definition = 10;
847 GetDeclaration get_declaration = 11;
848 GetTypeDefinition get_type_definition = 12;
849 GetImplementation get_implementation = 13;
850 InlayHints inlay_hints = 14;
851 SemanticTokens semantic_tokens = 16;
852 GetFoldingRanges get_folding_ranges = 17;
853 GetDocumentSymbols get_document_symbols = 18;
854 }
855}
856
857message LspQueryResponse {
858 uint64 project_id = 1;
859 uint64 lsp_request_id = 2;
860 repeated LspResponse responses = 3;
861}
862
863message LspResponse {
864 oneof response {
865 GetHoverResponse get_hover_response = 1;
866 GetCodeActionsResponse get_code_actions_response = 2;
867 GetSignatureHelpResponse get_signature_help_response = 3;
868 GetCodeLensResponse get_code_lens_response = 4;
869 GetDocumentDiagnosticsResponse get_document_diagnostics_response = 5;
870 GetDocumentColorResponse get_document_color_response = 6;
871 GetDefinitionResponse get_definition_response = 8;
872 GetDeclarationResponse get_declaration_response = 9;
873 GetTypeDefinitionResponse get_type_definition_response = 10;
874 GetImplementationResponse get_implementation_response = 11;
875 GetReferencesResponse get_references_response = 12;
876 InlayHintsResponse inlay_hints_response = 13;
877 SemanticTokensResponse semantic_tokens_response = 14;
878 GetFoldingRangesResponse get_folding_ranges_response = 15;
879 GetDocumentSymbolsResponse get_document_symbols_response = 16;
880 }
881 uint64 server_id = 7;
882}
883
884message AllLanguageServers {}
885
886message LanguageServerSelector {
887 oneof selector {
888 uint64 server_id = 1;
889 string name = 2;
890 }
891}
892
893message RestartLanguageServers {
894 uint64 project_id = 1;
895 repeated uint64 buffer_ids = 2;
896 repeated LanguageServerSelector only_servers = 3;
897 bool all = 4;
898}
899
900message StopLanguageServers {
901 uint64 project_id = 1;
902 repeated uint64 buffer_ids = 2;
903 repeated LanguageServerSelector also_servers = 3;
904 bool all = 4;
905}
906
907message LspExtRunnables {
908 uint64 project_id = 1;
909 uint64 buffer_id = 2;
910 optional Anchor position = 3;
911}
912
913message LspExtRunnablesResponse {
914 repeated LspRunnable runnables = 1;
915}
916
917message LspRunnable {
918 bytes task_template = 1;
919 optional LocationLink location = 2;
920}
921
922message LspExtCancelFlycheck {
923 uint64 project_id = 1;
924 uint64 language_server_id = 2;
925}
926
927message LspExtRunFlycheck {
928 uint64 project_id = 1;
929 optional uint64 buffer_id = 2;
930 uint64 language_server_id = 3;
931 bool current_file_only = 4;
932}
933
934message LspExtClearFlycheck {
935 uint64 project_id = 1;
936 uint64 language_server_id = 2;
937}
938
939message LspDiagnosticRelatedInformation {
940 optional string location_url = 1;
941 PointUtf16 location_range_start = 2;
942 PointUtf16 location_range_end = 3;
943 string message = 4;
944}
945
946enum LspDiagnosticTag {
947 None = 0;
948 Unnecessary = 1;
949 Deprecated = 2;
950}
951
952message LspDiagnostic {
953 PointUtf16 start = 1;
954 PointUtf16 end = 2;
955 Severity severity = 3;
956 optional string code = 4;
957 optional string code_description = 5;
958 optional string source = 6;
959 string message = 7;
960 repeated LspDiagnosticRelatedInformation related_information = 8;
961 repeated LspDiagnosticTag tags = 9;
962 optional string data = 10;
963
964 enum Severity {
965 None = 0;
966 Error = 1;
967 Warning = 2;
968 Information = 3;
969 Hint = 4;
970 }
971}
972
973message GetDocumentDiagnostics {
974 uint64 project_id = 1;
975 uint64 buffer_id = 2;
976 repeated VectorClockEntry version = 3;
977}
978
979message GetDocumentDiagnosticsResponse {
980 repeated PulledDiagnostics pulled_diagnostics = 1;
981}
982
983message PulledDiagnostics {
984 uint64 server_id = 1;
985 string uri = 2;
986 optional string result_id = 3;
987 bool changed = 4;
988 repeated LspDiagnostic diagnostics = 5;
989 optional string registration_id = 6;
990}
991
992message PullWorkspaceDiagnostics {
993 uint64 project_id = 1;
994 uint64 server_id = 2;
995}
996
997message ToggleLspLogs {
998 uint64 project_id = 1;
999 LogType log_type = 2;
1000 uint64 server_id = 3;
1001 bool enabled = 4;
1002
1003 enum LogType {
1004 LOG = 0;
1005 TRACE = 1;
1006 RPC = 2;
1007 }
1008}
1009
1010message GetFoldingRanges {
1011 uint64 project_id = 1;
1012 uint64 buffer_id = 2;
1013 repeated VectorClockEntry version = 3;
1014}
1015
1016message GetFoldingRangesResponse {
1017 repeated AnchorRange ranges = 1;
1018 repeated VectorClockEntry version = 2;
1019 repeated string collapsed_texts = 3;
1020}