Skip to content

Commit 44a76d4

Browse files
committed
WIP15
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
1 parent ece7252 commit 44a76d4

File tree

5 files changed

+95
-3276
lines changed

5 files changed

+95
-3276
lines changed

document.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ type NotebookDocumentFilterWithCells struct {
128128
// Notebook the notebook to be synced If a string value is provided it matches against the notebook type. '*' matches every notebook.
129129
//
130130
// @since 3.18.0
131-
Notebook *OneOf[string, NotebookDocumentFilter] `json:"notebook,omitempty"`
131+
Notebook *OneOf[string, NotebookDocumentFilter[NotebookDocumentFilterNotebookType, NotebookDocumentFilterScheme, NotebookDocumentFilterPattern]] `json:"notebook,omitempty"`
132132

133133
// Cells the cells of the matching notebook to be synced.
134134
//
@@ -143,7 +143,7 @@ type NotebookDocumentFilterWithNotebook struct {
143143
// Notebook the notebook to be synced If a string value is provided it matches against the notebook type. '*' matches every notebook.
144144
//
145145
// @since 3.18.0
146-
Notebook OneOf[string, NotebookDocumentFilter] `json:"notebook"`
146+
Notebook OneOf[string, NotebookDocumentFilter[NotebookDocumentFilterNotebookType, NotebookDocumentFilterScheme, NotebookDocumentFilterPattern]] `json:"notebook"`
147147

148148
// Cells the cells of the matching notebook to be synced.
149149
//
@@ -426,7 +426,7 @@ type NotebookDocumentFilterNotebookType struct {
426426
// Pattern a glob pattern.
427427
//
428428
// @since 3.18.0
429-
Pattern *GlobPattern `json:"pattern,omitempty"`
429+
Pattern *GlobPattern[Pattern, RelativePattern] `json:"pattern,omitempty"`
430430
}
431431

432432
// NotebookDocumentFilterScheme a notebook document filter where `scheme` is required field.
@@ -446,7 +446,7 @@ type NotebookDocumentFilterScheme struct {
446446
// Pattern a glob pattern.
447447
//
448448
// @since 3.18.0
449-
Pattern *GlobPattern `json:"pattern,omitempty"`
449+
Pattern *GlobPattern[Pattern, RelativePattern] `json:"pattern,omitempty"`
450450
}
451451

452452
// NotebookDocumentFilterPattern a notebook document filter where `pattern` is required field.
@@ -466,5 +466,5 @@ type NotebookDocumentFilterPattern struct {
466466
// Pattern a glob pattern.
467467
//
468468
// @since 3.18.0
469-
Pattern GlobPattern `json:"pattern"`
469+
Pattern GlobPattern[Pattern, RelativePattern] `json:"pattern"`
470470
}

language.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ type HoverParams struct {
20122012
// Hover the result of a hover request.
20132013
type Hover struct {
20142014
// Contents the hover's content.
2015-
Contents OneOf3[MarkupContent, MarkedString, []MarkedString] `json:"contents"`
2015+
Contents OneOf3[MarkupContent, MarkedString[string, MarkedStringWithLanguage], []MarkedString[string, MarkedStringWithLanguage]] `json:"contents"`
20162016

20172017
// Range an optional range inside the text document that is used to visualize the hover, e.g. by changing the
20182018
// background color.
@@ -2755,7 +2755,7 @@ type TextDocumentFilterLanguage struct {
27552755

27562756
// 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`.
27572757
// @since 3.18.0
2758-
Pattern *GlobPattern `json:"pattern,omitempty"`
2758+
Pattern *GlobPattern[Pattern, RelativePattern] `json:"pattern,omitempty"`
27592759
}
27602760

27612761
// TextDocumentFilterScheme a document filter where `scheme` is required field.
@@ -2774,7 +2774,7 @@ type TextDocumentFilterScheme struct {
27742774

27752775
// 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`.
27762776
// @since 3.18.0
2777-
Pattern *GlobPattern `json:"pattern,omitempty"`
2777+
Pattern *GlobPattern[Pattern, RelativePattern] `json:"pattern,omitempty"`
27782778
}
27792779

27802780
// TextDocumentFilterPattern a document filter where `pattern` is required field.
@@ -2793,5 +2793,5 @@ type TextDocumentFilterPattern struct {
27932793

27942794
// 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`.
27952795
// @since 3.18.0
2796-
Pattern GlobPattern `json:"pattern"`
2796+
Pattern GlobPattern[Pattern, RelativePattern] `json:"pattern"`
27972797
}

0 commit comments

Comments
 (0)