@@ -302,6 +302,7 @@ public partial class CodeActionRegistrationOptions : IWorkDoneProgressOptions, I
302302 ///
303303 /// @since 3.16.0
304304 /// </summary>
305+ [ Optional ]
305306 public bool ResolveProvider { get ; set ; }
306307
307308 class CodeActionRegistrationOptionsConverter : RegistrationOptionsConverterBase < CodeActionRegistrationOptions , StaticOptions >
@@ -324,113 +325,113 @@ public override StaticOptions Convert(CodeActionRegistrationOptions source)
324325 }
325326 }
326327
327- /// <summary>
328- /// A set of predefined code action kinds
329- /// </summary>
330- [ DebuggerDisplay ( "{" + nameof ( _value ) + "}" ) ]
331- [ JsonConverter ( typeof ( EnumLikeStringConverter ) ) ]
332- public readonly struct CodeActionKind : IEquatable < CodeActionKind > , IEnumLikeString
333- {
334- private static readonly Lazy < IReadOnlyList < CodeActionKind > > _defaults =
335- new Lazy < IReadOnlyList < CodeActionKind > > (
336- ( ) => {
337- return typeof ( CodeActionKind )
338- . GetFields ( BindingFlags . Static | BindingFlags . Public )
339- . Select ( z => z . GetValue ( null ) )
340- . Cast < CodeActionKind > ( )
341- . ToArray ( ) ;
342- }
343- ) ;
344-
345- public static IEnumerable < CodeActionKind > Defaults => _defaults . Value ;
346-
347328 /// <summary>
348- /// Base kind for quickfix actions: ''
329+ /// A set of predefined code action kinds
349330 /// </summary>
350- public static readonly CodeActionKind Empty = new CodeActionKind ( "" ) ;
331+ [ DebuggerDisplay ( "{" + nameof ( _value ) + "}" ) ]
332+ [ JsonConverter ( typeof ( EnumLikeStringConverter ) ) ]
333+ public readonly struct CodeActionKind : IEquatable < CodeActionKind > , IEnumLikeString
334+ {
335+ private static readonly Lazy < IReadOnlyList < CodeActionKind > > _defaults =
336+ new Lazy < IReadOnlyList < CodeActionKind > > (
337+ ( ) => {
338+ return typeof ( CodeActionKind )
339+ . GetFields ( BindingFlags . Static | BindingFlags . Public )
340+ . Select ( z => z . GetValue ( null ) )
341+ . Cast < CodeActionKind > ( )
342+ . ToArray ( ) ;
343+ }
344+ ) ;
345+
346+ public static IEnumerable < CodeActionKind > Defaults => _defaults . Value ;
351347
352- /// <summary>
353- /// Base kind for quickfix actions: 'quickfix '
354- /// </summary>
355- public static readonly CodeActionKind QuickFix = new CodeActionKind ( "quickfix " ) ;
348+ /// <summary>
349+ /// Base kind for quickfix actions: ''
350+ /// </summary>
351+ public static readonly CodeActionKind Empty = new CodeActionKind ( "" ) ;
356352
357- /// <summary>
358- /// Base kind for refactoring actions: 'refactor '
359- /// </summary>
360- public static readonly CodeActionKind Refactor = new CodeActionKind ( "refactor " ) ;
353+ /// <summary>
354+ /// Base kind for quickfix actions: 'quickfix '
355+ /// </summary>
356+ public static readonly CodeActionKind QuickFix = new CodeActionKind ( "quickfix " ) ;
361357
362- /// <summary>
363- /// Base kind for refactoring extraction actions: 'refactor.extract'
364- ///
365- /// Example extract actions:
366- ///
367- /// - Extract method
368- /// - Extract function
369- /// - Extract variable
370- /// - Extract interface from class
371- /// - ...
372- /// </summary>
373- public static readonly CodeActionKind RefactorExtract = new CodeActionKind ( "refactor.extract" ) ;
358+ /// <summary>
359+ /// Base kind for refactoring actions: 'refactor'
360+ /// </summary>
361+ public static readonly CodeActionKind Refactor = new CodeActionKind ( "refactor" ) ;
374362
375- /// <summary>
376- /// Base kind for refactoring inline actions: 'refactor.inline'
377- ///
378- /// Example inline actions:
379- ///
380- /// - Inline function
381- /// - Inline variable
382- /// - Inline constant
383- /// - ...
384- /// </summary>
385- public static readonly CodeActionKind RefactorInline = new CodeActionKind ( "refactor.inline" ) ;
363+ /// <summary>
364+ /// Base kind for refactoring extraction actions: 'refactor.extract'
365+ ///
366+ /// Example extract actions:
367+ ///
368+ /// - Extract method
369+ /// - Extract function
370+ /// - Extract variable
371+ /// - Extract interface from class
372+ /// - ...
373+ /// </summary>
374+ public static readonly CodeActionKind RefactorExtract = new CodeActionKind ( "refactor.extract" ) ;
386375
387- /// <summary>
388- /// Base kind for refactoring rewrite actions: 'refactor.rewrite'
389- ///
390- /// Example rewrite actions:
391- ///
392- /// - Convert JavaScript function to class
393- /// - Add or remove parameter
394- /// - Encapsulate field
395- /// - Make method static
396- /// - Move method to base class
397- /// - ...
398- /// </summary>
399- public static readonly CodeActionKind RefactorRewrite = new CodeActionKind ( "refactor.rewrite" ) ;
376+ /// <summary>
377+ /// Base kind for refactoring inline actions: 'refactor.inline'
378+ ///
379+ /// Example inline actions:
380+ ///
381+ /// - Inline function
382+ /// - Inline variable
383+ /// - Inline constant
384+ /// - ...
385+ /// </summary>
386+ public static readonly CodeActionKind RefactorInline = new CodeActionKind ( "refactor.inline" ) ;
400387
401- /// <summary>
402- /// Base kind for source actions: `source`
403- ///
404- /// Source code actions apply to the entire file.
405- /// </summary>
406- public static readonly CodeActionKind Source = new CodeActionKind ( "source" ) ;
388+ /// <summary>
389+ /// Base kind for refactoring rewrite actions: 'refactor.rewrite'
390+ ///
391+ /// Example rewrite actions:
392+ ///
393+ /// - Convert JavaScript function to class
394+ /// - Add or remove parameter
395+ /// - Encapsulate field
396+ /// - Make method static
397+ /// - Move method to base class
398+ /// - ...
399+ /// </summary>
400+ public static readonly CodeActionKind RefactorRewrite = new CodeActionKind ( "refactor.rewrite" ) ;
407401
408- /// <summary>
409- /// Base kind for an organize imports source action: `source.organizeImports`
410- /// </summary>
411- public static readonly CodeActionKind SourceOrganizeImports = new CodeActionKind ( "source.organizeImports" ) ;
402+ /// <summary>
403+ /// Base kind for source actions: `source`
404+ ///
405+ /// Source code actions apply to the entire file.
406+ /// </summary>
407+ public static readonly CodeActionKind Source = new CodeActionKind ( "source" ) ;
408+
409+ /// <summary>
410+ /// Base kind for an organize imports source action: `source.organizeImports`
411+ /// </summary>
412+ public static readonly CodeActionKind SourceOrganizeImports = new CodeActionKind ( "source.organizeImports" ) ;
412413
413- private readonly string ? _value ;
414+ private readonly string ? _value ;
414415
415- public CodeActionKind ( string kind ) => _value = kind ;
416+ public CodeActionKind ( string kind ) => _value = kind ;
416417
417- public static implicit operator CodeActionKind ( string kind ) => new CodeActionKind ( kind ) ;
418+ public static implicit operator CodeActionKind ( string kind ) => new CodeActionKind ( kind ) ;
418419
419- public static implicit operator string ( CodeActionKind kind ) => kind . _value ?? string . Empty ;
420+ public static implicit operator string ( CodeActionKind kind ) => kind . _value ?? string . Empty ;
420421
421- /// <inheritdoc />
422- public override string ToString ( ) => _value ?? string . Empty ;
422+ /// <inheritdoc />
423+ public override string ToString ( ) => _value ?? string . Empty ;
423424
424- public bool Equals ( CodeActionKind other ) => _value == other . _value ;
425+ public bool Equals ( CodeActionKind other ) => _value == other . _value ;
425426
426- public override bool Equals ( object obj ) => obj is CodeActionKind other && Equals ( other ) ;
427+ public override bool Equals ( object obj ) => obj is CodeActionKind other && Equals ( other ) ;
427428
428- public override int GetHashCode ( ) => _value != null ? _value . GetHashCode ( ) : 0 ;
429+ public override int GetHashCode ( ) => _value != null ? _value . GetHashCode ( ) : 0 ;
429430
430- public static bool operator == ( CodeActionKind left , CodeActionKind right ) => left . Equals ( right ) ;
431+ public static bool operator == ( CodeActionKind left , CodeActionKind right ) => left . Equals ( right ) ;
431432
432- public static bool operator != ( CodeActionKind left , CodeActionKind right ) => ! left . Equals ( right ) ;
433- }
433+ public static bool operator != ( CodeActionKind left , CodeActionKind right ) => ! left . Equals ( right ) ;
434+ }
434435 }
435436
436437 namespace Client . Capabilities
@@ -479,6 +480,18 @@ public partial class CodeActionCapability : DynamicCapability, ConnectedCapabili
479480 /// </summary>
480481 [ Optional ]
481482 public CodeActionCapabilityResolveSupportOptions ? ResolveSupport { get ; set ; }
483+
484+ /// <summary>
485+ /// Whether th client honors the change annotations in
486+ /// text edits and resource operations returned via the
487+ /// `CodeAction#edit` property by for example presenting
488+ /// the workspace edit in the user interface and asking
489+ /// for confirmation.
490+ ///
491+ /// @since 3.16.0 - proposed state
492+ /// </summary>
493+ [ Optional ]
494+ public bool HonorsChangeAnnotations { get ; set ; }
482495 }
483496
484497 public class CodeActionLiteralSupportOptions
0 commit comments