@@ -81,13 +81,14 @@ func DefaultOptions() *Options {
81
81
}
82
82
defaultOptions = & Options {
83
83
ClientOptions : ClientOptions {
84
- InsertTextFormat : protocol .PlainTextTextFormat ,
85
- PreferredContentFormat : protocol .Markdown ,
86
- ConfigurationSupported : true ,
87
- DynamicConfigurationSupported : true ,
88
- DynamicWatchedFilesSupported : true ,
89
- LineFoldingOnly : false ,
90
- HierarchicalDocumentSymbolSupport : true ,
84
+ InsertTextFormat : protocol .PlainTextTextFormat ,
85
+ PreferredContentFormat : protocol .Markdown ,
86
+ ConfigurationSupported : true ,
87
+ DynamicConfigurationSupported : true ,
88
+ DynamicRegistrationSemanticTokensSupported : true ,
89
+ DynamicWatchedFilesSupported : true ,
90
+ LineFoldingOnly : false ,
91
+ HierarchicalDocumentSymbolSupport : true ,
91
92
},
92
93
ServerOptions : ServerOptions {
93
94
SupportedCodeActions : map [FileKind ]map [protocol.CodeActionKind ]bool {
@@ -183,18 +184,19 @@ type Options struct {
183
184
// ClientOptions holds LSP-specific configuration that is provided by the
184
185
// client.
185
186
type ClientOptions struct {
186
- InsertTextFormat protocol.InsertTextFormat
187
- ConfigurationSupported bool
188
- DynamicConfigurationSupported bool
189
- DynamicWatchedFilesSupported bool
190
- PreferredContentFormat protocol.MarkupKind
191
- LineFoldingOnly bool
192
- HierarchicalDocumentSymbolSupport bool
193
- SemanticTypes []string
194
- SemanticMods []string
195
- RelatedInformationSupported bool
196
- CompletionTags bool
197
- CompletionDeprecated bool
187
+ InsertTextFormat protocol.InsertTextFormat
188
+ ConfigurationSupported bool
189
+ DynamicConfigurationSupported bool
190
+ DynamicRegistrationSemanticTokensSupported bool
191
+ DynamicWatchedFilesSupported bool
192
+ PreferredContentFormat protocol.MarkupKind
193
+ LineFoldingOnly bool
194
+ HierarchicalDocumentSymbolSupport bool
195
+ SemanticTypes []string
196
+ SemanticMods []string
197
+ RelatedInformationSupported bool
198
+ CompletionTags bool
199
+ CompletionDeprecated bool
198
200
}
199
201
200
202
// ServerOptions holds LSP-specific configuration that is provided by the
@@ -655,6 +657,7 @@ func (o *Options) ForClientCapabilities(caps protocol.ClientCapabilities) {
655
657
// Check if the client supports configuration messages.
656
658
o .ConfigurationSupported = caps .Workspace .Configuration
657
659
o .DynamicConfigurationSupported = caps .Workspace .DidChangeConfiguration .DynamicRegistration
660
+ o .DynamicRegistrationSemanticTokensSupported = caps .TextDocument .SemanticTokens .DynamicRegistration
658
661
o .DynamicWatchedFilesSupported = caps .Workspace .DidChangeWatchedFiles .DynamicRegistration
659
662
660
663
// Check which types of content format are supported by this client.
0 commit comments