Skip to content

Commit 3a82b37

Browse files
committed
all: add DocumentHighlightKind prefix to DocumentHighlightKind enum
1 parent 245b09b commit 3a82b37

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

language.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -625,24 +625,24 @@ type DocumentHighlight struct {
625625
type DocumentHighlightKind float64
626626

627627
const (
628-
// Text a textual occurrence.
629-
Text DocumentHighlightKind = 1
628+
// DocumentHighlightKindText a textual occurrence.
629+
DocumentHighlightKindText DocumentHighlightKind = 1
630630

631-
// Read read-access of a symbol, like reading a variable.
632-
Read DocumentHighlightKind = 2
631+
// DocumentHighlightKindRead read-access of a symbol, like reading a variable.
632+
DocumentHighlightKindRead DocumentHighlightKind = 2
633633

634-
// Write write-access of a symbol, like writing to a variable.
635-
Write DocumentHighlightKind = 3
634+
// DocumentHighlightKindWrite write-access of a symbol, like writing to a variable.
635+
DocumentHighlightKindWrite DocumentHighlightKind = 3
636636
)
637637

638638
// String implements fmt.Stringer.
639639
func (k DocumentHighlightKind) String() string {
640640
switch k {
641-
case Text:
641+
case DocumentHighlightKindText:
642642
return "Text"
643-
case Read:
643+
case DocumentHighlightKindRead:
644644
return "Read"
645-
case Write:
645+
case DocumentHighlightKindWrite:
646646
return "Write"
647647
default:
648648
return strconv.FormatFloat(float64(k), 'f', -10, 64)

language_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,7 +2054,7 @@ func testDocumentHighlight(t *testing.T, marshal marshalFunc, unmarshal unmarsha
20542054
Character: 10,
20552055
},
20562056
},
2057-
Kind: Text,
2057+
Kind: DocumentHighlightKindText,
20582058
}
20592059

20602060
t.Run("Marshal", func(t *testing.T) {
@@ -2146,17 +2146,17 @@ func TestDocumentHighlightKind_String(t *testing.T) {
21462146
}{
21472147
{
21482148
name: "Text",
2149-
k: Text,
2149+
k: DocumentHighlightKindText,
21502150
want: "Text",
21512151
},
21522152
{
21532153
name: "Read",
2154-
k: Read,
2154+
k: DocumentHighlightKindRead,
21552155
want: "Read",
21562156
},
21572157
{
21582158
name: "Write",
2159-
k: Write,
2159+
k: DocumentHighlightKindWrite,
21602160
want: "Write",
21612161
},
21622162
{

0 commit comments

Comments
 (0)