Skip to content

Commit ab7612b

Browse files
committed
all: add TextDocumentSyncKind prefix to TextDocumentSyncKind enum
1 parent c6d73b9 commit ab7612b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

general.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,27 +1486,27 @@ type InitializeError struct {
14861486
type TextDocumentSyncKind float64
14871487

14881488
const (
1489-
// None documents should not be synced at all.
1490-
None TextDocumentSyncKind = 0
1489+
// TextDocumentSyncKindNone documents should not be synced at all.
1490+
TextDocumentSyncKindNone TextDocumentSyncKind = 0
14911491

1492-
// Full documents are synced by always sending the full content
1492+
// TextDocumentSyncKindFull documents are synced by always sending the full content
14931493
// of the document.
1494-
Full TextDocumentSyncKind = 1
1494+
TextDocumentSyncKindFull TextDocumentSyncKind = 1
14951495

1496-
// Incremental documents are synced by sending the full content on open.
1496+
// TextDocumentSyncKindIncremental documents are synced by sending the full content on open.
14971497
// After that only incremental updates to the document are
14981498
// send.
1499-
Incremental TextDocumentSyncKind = 2
1499+
TextDocumentSyncKindIncremental TextDocumentSyncKind = 2
15001500
)
15011501

15021502
// String implements fmt.Stringer.
15031503
func (k TextDocumentSyncKind) String() string {
15041504
switch k {
1505-
case None:
1505+
case TextDocumentSyncKindNone:
15061506
return "None"
1507-
case Full:
1507+
case TextDocumentSyncKindFull:
15081508
return "Full"
1509-
case Incremental:
1509+
case TextDocumentSyncKindIncremental:
15101510
return "Incremental"
15111511
default:
15121512
return strconv.FormatFloat(float64(k), 'f', -10, 64)

general_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7063,17 +7063,17 @@ func TestTextDocumentSyncKind_String(t *testing.T) {
70637063
}{
70647064
{
70657065
name: "NoneKind",
7066-
k: None,
7066+
k: TextDocumentSyncKindNone,
70677067
want: "None",
70687068
},
70697069
{
70707070
name: "FullKind",
7071-
k: Full,
7071+
k: TextDocumentSyncKindFull,
70727072
want: "Full",
70737073
},
70747074
{
70757075
name: "IncrementalKind",
7076-
k: Incremental,
7076+
k: TextDocumentSyncKindIncremental,
70777077
want: "Incremental",
70787078
},
70797079
{
@@ -7477,7 +7477,7 @@ func testTextDocumentSyncOptions(t *testing.T, marshal marshalFunc, unmarshal un
74777477
)
74787478
wantType := TextDocumentSyncOptions{
74797479
OpenClose: true,
7480-
Change: Full,
7480+
Change: TextDocumentSyncKindFull,
74817481
WillSave: true,
74827482
WillSaveWaitUntil: true,
74837483
Save: &SaveOptions{

0 commit comments

Comments
 (0)