-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathfolding_range.gen.go
More file actions
137 lines (115 loc) · 5.49 KB
/
Copy pathfolding_range.gen.go
File metadata and controls
137 lines (115 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Copyright 2026 The Go Language Server Authors
// SPDX-License-Identifier: BSD-3-Clause
// Code generated by internal/genlsp from metaModel.json; DO NOT EDIT.
package protocol
// FoldingRangeKind A set of predefined range kinds.
type FoldingRangeKind string
// FoldingRangeKind enumeration values.
const (
// FoldingRangeKindComment Folding range for a comment
FoldingRangeKindComment FoldingRangeKind = "comment"
// FoldingRangeKindImports Folding range for an import or include
FoldingRangeKindImports FoldingRangeKind = "imports"
// FoldingRangeKindRegion Folding range for a region (e.g. `#region`)
FoldingRangeKindRegion FoldingRangeKind = "region"
)
// FoldingRangeParams Parameters for a [FoldingRangeRequest].
type FoldingRangeParams struct {
WorkDoneProgressParams
PartialResultParams
// TextDocument The text document.
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
// FoldingRange Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
// than the number of lines in the document. Clients are free to ignore invalid ranges.
type FoldingRange struct {
// StartLine The zero-based start line of the range to fold. The folded area starts after the line's last character.
// To be valid, the end must be zero or larger and smaller than the number of lines in the document.
StartLine uint32 `json:"startLine"`
// StartCharacter The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
StartCharacter *uint32 `json:"startCharacter,omitzero"`
// EndLine The zero-based end line of the range to fold. The folded area ends with the line's last character.
// To be valid, the end must be zero or larger and smaller than the number of lines in the document.
EndLine uint32 `json:"endLine"`
// EndCharacter The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
EndCharacter *uint32 `json:"endCharacter,omitzero"`
// Kind Describes the kind of the folding range such as 'comment' or 'region'. The kind
// is used to categorize folding ranges and used by commands like 'Fold all comments'.
// See [FoldingRangeKind] for an enumeration of standardized kinds.
Kind FoldingRangeKind `json:"kind,omitzero"`
// CollapsedText The text that the client should show when the specified range is
// collapsed. If not defined or not supported by the client, a default
// will be chosen by the client.
//
// Since: 3.17.0
CollapsedText *string `json:"collapsedText,omitzero"`
}
// FoldingRangeRegistrationOptions is defined by the LSP specification.
type FoldingRangeRegistrationOptions struct {
TextDocumentRegistrationOptions
FoldingRangeOptions
StaticRegistrationOptions
}
// FoldingRangeOptions is defined by the LSP specification.
type FoldingRangeOptions struct {
WorkDoneProgressOptions
}
// FoldingRangeWorkspaceClientCapabilities Client workspace capabilities specific to folding ranges
//
// Since: 3.18.0
type FoldingRangeWorkspaceClientCapabilities struct {
// RefreshSupport Whether the client implementation supports a refresh request sent from the
// server to the client.
//
// Note that this event is global and will force the client to refresh all
// folding ranges currently shown. It should be used with absolute care and is
// useful for situation where a server for example detects a project wide
// change that requires such a calculation.
//
// Since: 3.18.0
RefreshSupport *bool `json:"refreshSupport,omitzero"`
}
// FoldingRangeClientCapabilities is defined by the LSP specification.
type FoldingRangeClientCapabilities struct {
// DynamicRegistration Whether implementation supports dynamic registration for folding range
// providers. If this is set to `true` the client supports the new
// `FoldingRangeRegistrationOptions` return value for the corresponding
// server capability as well.
DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
// RangeLimit The maximum number of folding ranges that the client prefers to receive
// per document. The value serves as a hint, servers are free to follow the
// limit.
RangeLimit *uint32 `json:"rangeLimit,omitzero"`
// LineFoldingOnly If set, the client signals that it only supports folding complete lines.
// If set, client will ignore specified `startCharacter` and `endCharacter`
// properties in a FoldingRange.
LineFoldingOnly *bool `json:"lineFoldingOnly,omitzero"`
// FoldingRangeKind Specific options for the folding range kind.
//
// Since: 3.17.0
FoldingRangeKind *ClientFoldingRangeKindOptions `json:"foldingRangeKind,omitzero"`
// FoldingRange Specific options for the folding range.
//
// Since: 3.17.0
FoldingRange *ClientFoldingRangeOptions `json:"foldingRange,omitzero"`
}
// ClientFoldingRangeKindOptions is defined by the LSP specification.
//
// Since: 3.18.0
type ClientFoldingRangeKindOptions struct {
// ValueSet The folding range kind values the client supports. When this
// property exists the client also guarantees that it will
// handle values outside its set gracefully and falls back
// to a default value when unknown.
ValueSet []FoldingRangeKind `json:"valueSet,omitzero"`
}
// ClientFoldingRangeOptions is defined by the LSP specification.
//
// Since: 3.18.0
type ClientFoldingRangeOptions struct {
// CollapsedText If set, the client signals that it supports setting collapsedText on
// folding ranges to display custom labels instead of the default text.
//
// Since: 3.17.0
CollapsedText *bool `json:"collapsedText,omitzero"`
}