You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: language.go
+19-14Lines changed: 19 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
// Copyright 2024 The Go Language Server Authors
1
+
// Copyright 2025 The Go Language Server Authors
2
2
// SPDX-License-Identifier: BSD-3-Clause
3
3
4
4
package protocol
@@ -432,14 +432,14 @@ const (
432
432
// ApplyKind defines how values from a set of defaults and an individual item will be merged.
433
433
//
434
434
// @since 3.18.0
435
-
typeApplyKindstring
435
+
typeApplyKinduint32
436
436
437
437
const (
438
438
// ReplaceApplyKind the value from the individual item (if provided and not `null`) will be used instead of the default.
439
-
ReplaceApplyKindApplyKind="replace"
439
+
ReplaceApplyKindApplyKind=1
440
440
441
441
// MergeApplyKind the value from the item will be merged with the default. The specific rules for mergeing values are defined against each field that supports merging.
442
-
MergeApplyKindApplyKind="merge"
442
+
MergeApplyKindApplyKind=2
443
443
)
444
444
445
445
// SignatureHelpTriggerKind how a signature help was triggered.
@@ -1607,6 +1607,11 @@ type InlineCompletionRegistrationOptions struct {
1607
1607
StaticRegistrationOptions
1608
1608
}
1609
1609
1610
+
typeTextDocumentFilterClientCapabilitiesstruct {
1611
+
// RelativePatternSupport the client supports Relative Patterns.
@@ -1935,7 +1940,7 @@ type EditRangeWithInsertReplace struct {
1935
1940
ReplaceRange`json:"replace"`
1936
1941
}
1937
1942
1938
-
// CompletionItemDefaults in many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value. If a completion list specifies a default value and a completion item also specifies a corresponding value, the rules for combining these are defined by `applyKinds` (if the client supports it), defaulting to "replace". Servers are only allowed to return default values if the client signals support for this via the `completionList.itemDefaults` capability.
1943
+
// CompletionItemDefaults in many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value. If a completion list specifies a default value and a completion item also specifies a corresponding value, the rules for combining these are defined by `applyKinds` (if the client supports it), defaulting to ApplyKind.Replace. Servers are only allowed to return default values if the client signals support for this via the `completionList.itemDefaults` capability.
1939
1944
//
1940
1945
// @since 3.17.0
1941
1946
typeCompletionItemDefaultsstruct {
@@ -1960,16 +1965,16 @@ type CompletionItemDefaults struct {
1960
1965
Dataany`json:"data,omitempty"`
1961
1966
}
1962
1967
1963
-
// CompletionItemApplyKinds specifies how fields from a completion item should be combined with those from `completionList.itemDefaults`. If unspecified, all fields will be treated as "replace". If a field's value is "replace", the value from a completion item (if provided and not `null`) will always be used instead of the value from `completionItem.itemDefaults`. If a field's value is "merge", the values will be merged using the rules defined against each field below. Servers are only allowed to return `applyKind` if the client signals support for this via the `completionList.applyKindSupport` capability.
1968
+
// CompletionItemApplyKinds specifies how fields from a completion item should be combined with those from `completionList.itemDefaults`. If unspecified, all fields will be treated as ApplyKind.Replace. If a field's value is ApplyKind.Replace, the value from a completion item (if provided and not `null`) will always be used instead of the value from `completionItem.itemDefaults`. If a field's value is ApplyKind.Merge, the values will be merged using the rules defined against each field below. Servers are only allowed to return `applyKind` if the client signals support for this via the `completionList.applyKindSupport` capability.
1964
1969
//
1965
1970
// @since 3.18.0
1966
1971
typeCompletionItemApplyKindsstruct {
1967
-
// CommitCharacters specifies whether commitCharacters on a completion will replace or be merged with those in `completionList.itemDefaults.commitCharacters`. If "replace", the commit characters from the completion item will always be used unless not provided, in which case those from `completionList.itemDefaults.commitCharacters` will be used. An empty list can be used if a completion item does not have any commit characters and also should not use those from `completionList.itemDefaults.commitCharacters`. If "merge" the commitCharacters for the completion will be the union of all values in both `completionList.itemDefaults.commitCharacters` and the completion's own `commitCharacters`.
1972
+
// CommitCharacters specifies whether commitCharacters on a completion will replace or be merged with those in `completionList.itemDefaults.commitCharacters`. If ApplyKind.Replace, the commit characters from the completion item will always be used unless not provided, in which case those from `completionList.itemDefaults.commitCharacters` will be used. An empty list can be used if a completion item does not have any commit characters and also should not use those from `completionList.itemDefaults.commitCharacters`.
1973
+
// If ApplyKind.Merge the commitCharacters for the completion will be the union of all values in both `completionList.itemDefaults.commitCharacters` and the completion's own `commitCharacters`.
// Data specifies whether the `data` field on a completion will replace or be merged with data from `completionList.itemDefaults.data`. If "replace", the data from the completion item will be used if provided
1972
-
// (and not `null`), otherwise `completionList.itemDefaults.data` will be used. An empty object can be used if a completion item does not have any data but also should not use the value from `completionList.itemDefaults.data`. If "merge", a shallow merge will be performed between `completionList.itemDefaults.data` and the completion's own data using the following rules: - If a completion's `data` field is not provided (or `null`), the entire `data` field from `completionList.itemDefaults.data` will be used as-is. - If a completion's `data` field is provided, each field will overwrite the field of the same name in `completionList.itemDefaults.data` but no merging of nested fields within that value will occur.
1977
+
// Data specifies whether the `data` field on a completion will replace or be merged with data from `completionList.itemDefaults.data`. If ApplyKind.Replace, the data from the completion item will be used if provided (and not `null`), otherwise `completionList.itemDefaults.data` will be used. An empty object can be used if a completion item does not have any data but also should not use the value from `completionList.itemDefaults.data`. If ApplyKind.Merge, a shallow merge will be performed between `completionList.itemDefaults.data` and the completion's own data using the following rules: - If a completion's `data` field is not provided (or `null`), the entire `data` field from `completionList.itemDefaults.data` will be used as-is. - If a completion's `data` field is provided, each field will overwrite the field of the same name in `completionList.itemDefaults.data` but no merging of nested fields within that value will occur.
1973
1978
// @since 3.18.0
1974
1979
DataApplyKind`json:"data,omitempty"`
1975
1980
}
@@ -1979,10 +1984,10 @@ type CompletionList struct {
1979
1984
// IsIncomplete this list it not complete. Further typing results in recomputing this list. Recomputed lists have all their items replaced (not appended) in the incomplete completion sessions.
1980
1985
IsIncompletebool`json:"isIncomplete"`
1981
1986
1982
-
// ItemDefaults in many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value. If a completion list specifies a default value and a completion item also specifies a corresponding value, the rules for combining these are defined by `applyKinds` (if the client supports it), defaulting to "replace". Servers are only allowed to return default values if the client signals support for this via the `completionList.itemDefaults` capability.
1987
+
// ItemDefaults in many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value. If a completion list specifies a default value and a completion item also specifies a corresponding value, the rules for combining these are defined by `applyKinds` (if the client supports it), defaulting to ApplyKind.Replace. Servers are only allowed to return default values if the client signals support for this via the `completionList.itemDefaults` capability.
// ApplyKind specifies how fields from a completion item should be combined with those from `completionList.itemDefaults`. If unspecified, all fields will be treated as "replace". If a field's value is "replace", the value from a completion item (if provided and not `null`) will always be used instead of the value from `completionItem.itemDefaults`. If a field's value is "merge", the values will be merged using the rules defined against each field below. Servers are only allowed to return `applyKind` if the client signals support for this via the `completionList.applyKindSupport` capability.
1990
+
// ApplyKind specifies how fields from a completion item should be combined with those from `completionList.itemDefaults`. If unspecified, all fields will be treated as ApplyKind.Replace. If a field's value is ApplyKind.Replace, the value from a completion item (if provided and not `null`) will always be used instead of the value from `completionItem.itemDefaults`. If a field's value is ApplyKind.Merge, the values will be merged using the rules defined against each field below. Servers are only allowed to return `applyKind` if the client signals support for this via the `completionList.applyKindSupport` capability.
@@ -2745,7 +2750,7 @@ type TextDocumentFilterLanguage struct {
2745
2750
// @since 3.18.0
2746
2751
Schemestring`json:"scheme,omitempty"`
2747
2752
2748
-
// Pattern a glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. 3.18.0 - support for relative patterns.
2753
+
// Pattern a glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. 3.18.0 - support for relative patterns. Whether clients support relative patterns depends on the client capability `textDocuments.filters.relativePatternSupport`.
2749
2754
// @since 3.18.0
2750
2755
Pattern*GlobPattern`json:"pattern,omitempty"`
2751
2756
}
@@ -2764,7 +2769,7 @@ type TextDocumentFilterScheme struct {
2764
2769
// @since 3.18.0
2765
2770
Schemestring`json:"scheme"`
2766
2771
2767
-
// Pattern a glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. 3.18.0 - support for relative patterns.
2772
+
// Pattern a glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. 3.18.0 - support for relative patterns. Whether clients support relative patterns depends on the client capability `textDocuments.filters.relativePatternSupport`.
2768
2773
// @since 3.18.0
2769
2774
Pattern*GlobPattern`json:"pattern,omitempty"`
2770
2775
}
@@ -2783,7 +2788,7 @@ type TextDocumentFilterPattern struct {
2783
2788
// @since 3.18.0
2784
2789
Schemestring`json:"scheme,omitempty"`
2785
2790
2786
-
// Pattern a glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. 3.18.0 - support for relative patterns.
2791
+
// Pattern a glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. 3.18.0 - support for relative patterns. Whether clients support relative patterns depends on the client capability `textDocuments.filters.relativePatternSupport`.
0 commit comments