[analysis_server] Update generated code to match latest spec

This should have been a small change to keep us in-sync with small changes so when there are bigger changes (LSP 3.18.0) the change is less noisy.

However, it turns out the meta model is built from the latest version always, so it includes 3.18.0 proposed features.

So this change not only regenerates the code with the latest spec, it also adds some handling to exclude any types (and methods) marked as proposed.

It also includes a few minor fixes to things like re-wrapping of comments where there are references.

So, it should still essentially be a non-functional change, but the CL isn't as small as planned because of the cleanup.

- The lsp_meta_model.json file is downloaded and not changes I've made
- The protocol_generated.dart file is the output of the code-gen
- All other files are changes I made manually

Change-Id: I6380f86848d2799cf94d58a419ace0bf0d5a35ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Danny Tuppeny 2023-12-05 19:58:47 +00:00 committed by Commit Queue
parent 59946bece7
commit 23e1437f6a
12 changed files with 673 additions and 128 deletions

View file

@ -48,7 +48,7 @@ class DocumentLinkHandler
DocumentLink _convert(DartDocumentLink link, LineInfo lineInfo) {
return DocumentLink(
range: toRange(lineInfo, link.offset, link.length),
target: Uri.file(link.targetPath).toString(),
target: Uri.file(link.targetPath),
);
}
}

View file

@ -306,7 +306,7 @@ class LspAnalysisServer extends AnalysisServer {
// Dart settings for each workspace folder.
for (final folder in folders)
ConfigurationItem(
scopeUri: pathContext.toUri(folder).toString(),
scopeUri: pathContext.toUri(folder),
section: 'dart',
),
// Global Dart settings. This comes last to simplify matching up the

View file

@ -36,6 +36,6 @@ class A {}
final link = links!.single;
expect(link.range, code.range.range);
expect(link.target, exampleFileUri.toString());
expect(link.target, exampleFileUri);
}
}

View file

@ -1276,8 +1276,7 @@ mixin LspAnalysisServerTestMixin
return configurationParams.items.map(
(requestedConfig) {
final uri = requestedConfig.scopeUri;
final path =
uri != null ? pathContext.fromUri(Uri.parse(uri)) : null;
final path = uri != null ? pathContext.fromUri(uri) : null;
// Use the config the test provided for this path, or fall back to
// global.
return (folders != null ? folders[path] : null) ?? global;

View file

@ -9,7 +9,7 @@ import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';
import '../../../tool/lsp_spec/meta_model_reader.dart';
import '../../../tool/lsp_spec/meta_model.dart';
void main() {
final serverPkgPath = _getAnalysisServerPkgPath();
@ -20,15 +20,18 @@ void main() {
group('LSP readme', () {
test('contains all methods', () {
final readmeContent = readmeFile.readAsStringSync();
final model = LspMetaModelReader().readFile(metaModelJsonFile);
var model = LspMetaModelReader().readFile(metaModelJsonFile);
model = LspMetaModelCleaner().cleanModel(model);
final missingMethods = StringBuffer();
for (final method in model.methods) {
// Handle `foo/*` in the readme as well as `foo/bar`.
final methodWildcard = method.replaceAll(RegExp(r'\/[^\/]+$'), '/*');
if (!readmeContent.contains(' $method ') &&
final methodName = method.value;
final methodWildcard =
methodName.replaceAll(RegExp(r'\/[^\/]+$'), '/*');
if (!readmeContent.contains(' $methodName ') &&
!readmeContent.contains(' $methodWildcard ')) {
missingMethods.writeln(method);
missingMethods.writeln(methodName);
}
}

View file

@ -360,15 +360,22 @@ Iterable<String> _wrapLines(List<String> lines, int maxLength) sync* {
yield line;
break;
} else {
// First try to wrap at the last space before the max length, and fall
// back to wrapping at the first space if there were none before the
// max length.
var lastSpace = line.lastIndexOf(' ', maxLength);
// If there was no valid place to wrap, yield the whole string.
if (lastSpace == -1) {
lastSpace = line.indexOf(' ');
}
// If we still don't have one, the whole line has no spaces to split on.
if (lastSpace == -1) {
yield line;
break;
} else {
yield line.substring(0, lastSpace);
line = line.substring(lastSpace + 1);
}
yield line.substring(0, lastSpace);
line = line.substring(lastSpace + 1);
}
}
}

View file

@ -522,6 +522,7 @@ class AbstractGetter extends Member {
AbstractGetter({
required super.name,
super.comment,
super.isProposed,
required this.type,
});
}

View file

@ -44,6 +44,7 @@ class Constant extends Member with LiteralValueMixin {
Constant({
required super.name,
super.comment,
super.isProposed,
required this.type,
required this.value,
});
@ -59,6 +60,7 @@ class Field extends Member {
Field({
required super.name,
super.comment,
super.isProposed,
required this.type,
required this.allowsNull,
required this.allowsUndefined,
@ -86,6 +88,7 @@ class Interface extends LspEntity {
Interface({
required super.name,
super.comment,
super.isProposed,
this.baseTypes = const [],
required this.members,
this.abstract = false,
@ -152,10 +155,12 @@ mixin LiteralValueMixin {
abstract class LspEntity {
final String name;
final String? comment;
final bool isProposed;
final bool isDeprecated;
LspEntity({
required this.name,
required this.comment,
this.isProposed = false,
}) : isDeprecated = comment?.contains('@deprecated') ?? false;
}
@ -166,6 +171,7 @@ class LspEnum extends LspEntity {
LspEnum({
required super.name,
super.comment,
super.isProposed,
required this.typeOfValues,
required this.members,
}) {
@ -175,7 +181,7 @@ class LspEnum extends LspEntity {
class LspMetaModel {
final List<LspEntity> types;
final List<String> methods;
final List<Constant> methods;
LspMetaModel({required this.types, required this.methods});
}
@ -201,6 +207,7 @@ abstract class Member extends LspEntity {
Member({
required super.name,
super.comment,
super.isProposed,
});
}
@ -232,6 +239,7 @@ class TypeAlias extends LspEntity {
TypeAlias({
required super.name,
super.comment,
super.isProposed,
required this.baseType,
required this.isRename,
});

View file

@ -22,7 +22,7 @@ class LspMetaModelCleaner {
/// wrapping and not formatting. This allows us to rewrap based on our indent
/// level/line length without potentially introducing very short lines.
final _sourceCommentWrappingNewlinesPattern =
RegExp(r'[\w`\]\).]\n[\w`\[\(]');
RegExp(r'\w[`\]\)\}.]*\n[`\[\{\(]*\w');
/// A pattern matching the spec's older HTML links that we can extract type
/// references from.
@ -48,22 +48,27 @@ class LspMetaModelCleaner {
final _sourceCommentThenablePromisePattern =
RegExp(r'\b(?:Thenable|Promise)\b');
/// Whether to include proposed types and fields in generated code.
///
/// The LSP meta model is often regenerated from the latest code and includes
/// unreleased/proposed APIs that we usually don't want to pollute the
/// generated code with until they are finalized.
final includeProposed = false;
/// Cleans an entire [LspMetaModel].
LspMetaModel cleanModel(LspMetaModel model) {
final types = cleanTypes(model.types);
return LspMetaModel(types: types, methods: model.methods);
return LspMetaModel(
types: types,
methods: model.methods.where(_includeEntityInOutput).toList(),
);
}
/// Cleans a List of types.
List<LspEntity> cleanTypes(List<LspEntity> types) {
types = _mergeTypes(types);
types = types
.where((type) => _includeTypeInOutput(type.name))
.map(_clean)
.toList();
types = _renameTypes(types)
.where((type) => _includeTypeInOutput(type.name))
.toList();
types = types.where(_includeEntityInOutput).map(_clean).toList();
types = _renameTypes(types).where(_includeEntityInOutput).toList();
return types;
}
@ -154,10 +159,12 @@ class LspMetaModelCleaner {
return Interface(
name: interface.name,
comment: _cleanComment(interface.comment),
isProposed: interface.isProposed,
baseTypes: interface.baseTypes
.where((type) => _includeTypeInOutput(type.name))
.toList(),
members: interface.members
.where(_includeEntityInOutput)
.map((member) => _cleanMember(interface.name, member))
.toList(),
);
@ -177,8 +184,10 @@ class LspMetaModelCleaner {
return LspEnum(
name: namespace.name,
comment: _cleanComment(namespace.comment),
isProposed: namespace.isProposed,
typeOfValues: namespace.typeOfValues,
members: namespace.members
.where(_includeEntityInOutput)
.map((member) => _cleanMember(namespace.name, member))
.toList(),
);
@ -312,7 +321,25 @@ class LspMetaModelCleaner {
}
}
/// Removes types that are in the spec that we don't want to emit.
/// Returns whether an entity should be included in the generated code.
bool _includeEntityInOutput(LspEntity entity) {
if (!includeProposed && entity.isProposed) {
return false;
}
if (entity is Interface || entity is LspEnum || entity is TypeAlias) {
if (!_includeTypeInOutput(entity.name)) {
return false;
}
}
return true;
}
/// Returns whether the type with [name] should be included in generated code.
///
/// For [LspEntity]s, [_includeEntityInOutput] should be used instead which
/// includes this check and others.
bool _includeTypeInOutput(String name) {
const ignoredTypes = {
// InitializeError is not used for v3.0 (Feb 2017) and by dropping it we
@ -350,17 +377,20 @@ class LspMetaModelCleaner {
if (source.runtimeType != dest.runtimeType) {
throw 'Cannot merge ${source.runtimeType} into ${dest.runtimeType}';
}
final comment = dest.comment ?? source.comment;
if (source is LspEnum && dest is LspEnum) {
return LspEnum(
name: dest.name,
comment: dest.comment ?? source.comment,
comment: comment,
isProposed: dest.isProposed,
typeOfValues: dest.typeOfValues,
members: [...dest.members, ...source.members],
);
} else if (source is Interface && dest is Interface) {
return Interface(
name: dest.name,
comment: dest.comment ?? source.comment,
comment: comment,
isProposed: dest.isProposed,
baseTypes: [...dest.baseTypes, ...source.baseTypes],
members: [...dest.members, ...source.members],
);
@ -417,6 +447,7 @@ class LspMetaModelCleaner {
yield TypeAlias(
name: type.name,
comment: type.comment,
isProposed: type.isProposed,
baseType: TypeReference(newName),
isRename: true,
);
@ -426,6 +457,7 @@ class LspMetaModelCleaner {
yield Interface(
name: newName,
comment: type.comment,
isProposed: type.isProposed,
baseTypes: type.baseTypes,
members: type.members,
);
@ -433,6 +465,7 @@ class LspMetaModelCleaner {
yield TypeAlias(
name: newName,
comment: type.comment,
isProposed: type.isProposed,
baseType: type.baseType,
isRename: type.isRename,
);

View file

@ -40,9 +40,7 @@ class LspMetaModelReader {
final structures = model['structures'] as List?;
final enums = model['enumerations'] as List?;
final typeAliases = model['typeAliases'] as List?;
final methodNames = [...?requests, ...?notifications]
.map((item) => item['method'] as String)
.toList();
final methods = [...?requests, ...?notifications].toList();
[
...?structures?.map(_readStructure),
...?enums?.map((e) => _readEnum(e)),
@ -55,12 +53,15 @@ class LspMetaModelReader {
requests?.forEach(_readRequest);
notifications?.forEach(_readNotification);
final methodsEnum = _createMethodNamesEnum(methodNames);
final methodsEnum = _createMethodsEnum(methods);
if (methodsEnum != null) {
_addType(methodsEnum);
}
return LspMetaModel(types: types, methods: methodNames);
return LspMetaModel(
types: types,
methods: methodsEnum?.members.cast<Constant>().toList() ?? [],
);
}
/// Adds [type] to the current list and prevents its name from being used
@ -74,18 +75,25 @@ class LspMetaModelReader {
str.substring(0, 1).toLowerCase() + str.substring(1);
/// Creates an enum for all LSP method names.
LspEnum? _createMethodNamesEnum(List<String> methods) {
Constant toConstant(String value) {
final comment = '''Constant for the '$value' method.''';
LspEnum? _createMethodsEnum(List<Object?> methods) {
Constant toConstant(Map<String, Object?> item) {
final name = item['method'] as String;
// We use documentation from the request/notification for things like
// proposed check, but we don't put the full request/notification docs
// on the method enum member.
final documentation = item['documentation'] as String?;
final comment = '''Constant for the '$name' method.''';
return Constant(
name: _generateMemberName(value, camelCase: true),
name: _generateMemberName(name, camelCase: true),
comment: comment,
isProposed: _isProposed(documentation),
type: TypeReference.string,
value: value,
value: name,
);
}
final methodConstants = methods.map(toConstant).toList();
final methodConstants =
methods.cast<Map<String, Object?>>().map(toConstant).toList();
if (methodConstants.isEmpty) {
return null;
@ -120,6 +128,7 @@ class LspMetaModelReader {
_addType(TypeAlias(
name: name,
comment: documentation,
isProposed: _isProposed(documentation),
baseType: type,
isRename: false,
));
@ -128,9 +137,11 @@ class LspMetaModelReader {
Constant _extractEnumValue(TypeBase parentType, dynamic model) {
final name = model['name'] as String;
final documentation = model['documentation'] as String?;
return Constant(
name: _generateMemberName(name),
comment: model['documentation'] as String?,
comment: documentation,
isProposed: _isProposed(documentation),
type: parentType,
value: model['value'].toString(),
);
@ -138,6 +149,7 @@ class LspMetaModelReader {
Member _extractMember(String parentName, dynamic model) {
final name = model['name'] as String;
final documentation = model['documentation'] as String?;
var type = _extractType(parentName, name, model['type']);
// Unions may contain `null` types which we promote up to the field.
@ -154,7 +166,8 @@ class LspMetaModelReader {
return Field(
name: _generateMemberName(name),
comment: model['documentation'] as String?,
comment: documentation,
isProposed: _isProposed(documentation),
type: type,
allowsNull: allowsNull,
allowsUndefined: model['optional'] == true,
@ -274,14 +287,20 @@ class LspMetaModelReader {
return '${capitalize(parent)}${capitalize(child)}';
}
bool _isProposed(String? documentation) {
return documentation?.contains('@proposed') ?? false;
}
LspEnum _readEnum(dynamic model) {
final name = model['name'] as String;
final type = TypeReference(name);
final baseType = _extractType(name, null, model['type']);
final documentation = model['documentation'] as String?;
return LspEnum(
name: name,
comment: model['documentation'] as String?,
comment: documentation,
isProposed: _isProposed(documentation),
typeOfValues: baseType,
members: [
...?(model['values'] as List?)?.map((p) => _extractEnumValue(type, p)),
@ -320,9 +339,11 @@ class LspMetaModelReader {
LspEntity _readStructure(dynamic model) {
final name = model['name'] as String;
final documentation = model['documentation'] as String?;
return Interface(
name: name,
comment: model['documentation'] as String?,
comment: documentation,
isProposed: _isProposed(documentation),
baseTypes: [
...?(model['extends'] as List?)
?.map((e) => TypeReference(e['name'] as String)),
@ -337,9 +358,11 @@ class LspMetaModelReader {
TypeAlias _readTypeAlias(dynamic model) {
final name = model['name'] as String;
final documentation = model['documentation'] as String?;
return TypeAlias(
name: name,
comment: model['documentation'] as String?,
comment: documentation,
isProposed: _isProposed(documentation),
baseType: _extractType(name, null, model['type']),
isRename: false,
);

View file

@ -7645,13 +7645,13 @@ typedef TextDocumentCodeLensResult = List<CodeLens>?;
/// Result for request to request completion at a given text document position.
/// The request's parameter is of type [TextDocumentPosition] the response is of
/// type [CompletionItem] or [CompletionList]
/// or a [Future] that resolves to such.
/// type [CompletionItem] or [CompletionList] or a [Future] that resolves to
/// such.
///
/// The request can delay the computation of the [CompletionItem.detail]
/// and [CompletionItem.documentation] properties to the
/// `completionItem/resolve` request. However, properties that are needed for
/// the initial sorting and filtering, like `sortText`,
/// The request can delay the computation of the [CompletionItem.detail] and
/// [CompletionItem.documentation] properties to the `completionItem/resolve`
/// request. However, properties that are needed for the initial sorting and
/// filtering, like `sortText`,
/// `filterText`, `insertText`, and `textEdit`, must not be changed during
/// resolve.
typedef TextDocumentCompletionResult
@ -7664,22 +7664,23 @@ typedef TextDocumentContentChangeEvent
/// Result for a request to resolve the type definition locations of a symbol at
/// a given text document position. The request's parameter is of type
/// [TextDocumentPositionParams] the response is of type [Declaration]
/// or a typed array of [DeclarationLink] or a [Future] that resolves to such.
/// [TextDocumentPositionParams] the response is of type [Declaration] or a
/// typed array of [DeclarationLink] or a [Future] that resolves to such.
typedef TextDocumentDeclarationResult
= Either2<Declaration, List<DeclarationLink>>?;
/// Result for a request to resolve the definition location of a symbol at a
/// given text document position. The request's parameter is of type
/// [TextDocumentPosition] the response is of either type [Definition]
/// or a typed array of [DefinitionLink] or a [Future] that resolves to such.
/// [TextDocumentPosition] the response is of either type [Definition] or a
/// typed array of
/// [DefinitionLink] or a [Future] that resolves to such.
typedef TextDocumentDefinitionResult
= Either2<Definition, List<DefinitionLink>>?;
/// Result for request to resolve a [DocumentHighlight] for a given text
/// document position. The request's parameter is of type [TextDocumentPosition]
/// the request response is of type [DocumentHighlight] or a [Future] that
/// resolves to such.
/// the request response is an array of type [DocumentHighlight] or a [Future]
/// that resolves to such.
typedef TextDocumentDocumentHighlightResult = List<DocumentHighlight>?;
/// Result for a request to provide document links
@ -7867,6 +7868,10 @@ typedef WorkspaceSymbolResult
/// server before files are actually created as long as the creation is
/// triggered from within the client.
///
/// The request can return a `WorkspaceEdit` which will be applied to workspace
/// before the files are created. Hence the `WorkspaceEdit` can not manipulate
/// the content of the file to be created.
///
/// @since 3.16.0
typedef WorkspaceWillCreateFilesResult = WorkspaceEdit?;
@ -8707,8 +8712,8 @@ class CallHierarchyOutgoingCall implements ToJsonable {
/// The range at which this item is called. This is the range relative to the
/// caller, e.g the item passed to
/// [CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls]
/// and not [CallHierarchyOutgoingCall.to].
/// [CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls] and not
/// [CallHierarchyOutgoingCall.to].
final List<Range> fromRanges;
/// The item that is called.
@ -11222,8 +11227,8 @@ class ColorPresentation implements ToJsonable {
final String label;
/// An [TextEdit] which is applied to a document when selecting this
/// presentation for the color. When `falsy` the [ColorPresentation.label]
/// is used.
/// presentation for the color. When `falsy` the [ColorPresentation.label] is
/// used.
final TextEdit? textEdit;
ColorPresentation({
this.additionalTextEdits,
@ -12149,13 +12154,11 @@ class CompletionItem implements ToJsonable {
final Either2<MarkupContent, String>? documentation;
/// A string that should be used when filtering a set of completion items.
/// When `falsy` the [CompletionItem.label]
/// is used.
/// When `falsy` the [CompletionItem.label] is used.
final String? filterText;
/// A string that should be inserted into a document when selecting this
/// completion. When `falsy` the [CompletionItem.label]
/// is used.
/// completion. When `falsy` the [CompletionItem.label] is used.
///
/// The `insertText` is subject to interpretation by the client side. Some
/// tools might not take the string literally. For example VS Code when code
@ -12206,8 +12209,7 @@ class CompletionItem implements ToJsonable {
final bool? preselect;
/// A string that should be used when comparing this item with other items.
/// When `falsy` the [CompletionItem.label]
/// is used.
/// When `falsy` the [CompletionItem.label] is used.
final String? sortText;
/// Tags for this completion item.
@ -13733,7 +13735,7 @@ class ConfigurationItem implements ToJsonable {
);
/// The scope to get the configuration section for.
final String? scopeUri;
final LSPUri? scopeUri;
/// The configuration section asked for.
final String? section;
@ -13760,7 +13762,7 @@ class ConfigurationItem implements ToJsonable {
Map<String, Object?> toJson() {
var result = <String, Object?>{};
if (scopeUri != null) {
result['scopeUri'] = scopeUri;
result['scopeUri'] = scopeUri?.toString();
}
if (section != null) {
result['section'] = section;
@ -13773,7 +13775,7 @@ class ConfigurationItem implements ToJsonable {
static bool canParse(Object? obj, LspJsonReporter reporter) {
if (obj is Map<String, Object?>) {
if (!_canParseString(obj, reporter, 'scopeUri',
if (!_canParseUri(obj, reporter, 'scopeUri',
allowsUndefined: true, allowsNull: false)) {
return false;
}
@ -13787,7 +13789,8 @@ class ConfigurationItem implements ToJsonable {
static ConfigurationItem fromJson(Map<String, Object?> json) {
final scopeUriJson = json['scopeUri'];
final scopeUri = scopeUriJson as String?;
final scopeUri =
scopeUriJson != null ? Uri.parse(scopeUriJson as String) : null;
final sectionJson = json['section'];
final section = sectionJson as String?;
return ConfigurationItem(
@ -16085,8 +16088,7 @@ class DidChangeWatchedFilesClientCapabilities implements ToJsonable {
/// for file changes from the server side.
final bool? dynamicRegistration;
/// Whether the client has support for [RelativePattern]
/// or not.
/// Whether the client has support for [RelativePattern] or not.
///
/// @since 3.17.0
final bool? relativePatternSupport;
@ -17954,7 +17956,7 @@ class DocumentLink implements ToJsonable {
final Range range;
/// The uri this link points to. If missing a resolve request is sent later.
final String? target;
final LSPUri? target;
/// The tooltip text when you hover over this link.
///
@ -17997,7 +17999,7 @@ class DocumentLink implements ToJsonable {
}
result['range'] = range.toJson();
if (target != null) {
result['target'] = target;
result['target'] = target?.toString();
}
if (tooltip != null) {
result['tooltip'] = tooltip;
@ -18014,7 +18016,7 @@ class DocumentLink implements ToJsonable {
allowsUndefined: false, allowsNull: false)) {
return false;
}
if (!_canParseString(obj, reporter, 'target',
if (!_canParseUri(obj, reporter, 'target',
allowsUndefined: true, allowsNull: false)) {
return false;
}
@ -18032,7 +18034,7 @@ class DocumentLink implements ToJsonable {
final rangeJson = json['range'];
final range = Range.fromJson(rangeJson as Map<String, Object?>);
final targetJson = json['target'];
final target = targetJson as String?;
final target = targetJson != null ? Uri.parse(targetJson as String) : null;
final tooltipJson = json['tooltip'];
final tooltip = tooltipJson as String?;
return DocumentLink(
@ -21209,8 +21211,8 @@ class FoldingRange implements ToJsonable {
/// 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.
/// all comments'.
/// See [FoldingRangeKind] for an enumeration of standardized kinds.
final FoldingRangeKind? kind;
/// The zero-based character offset from where the folded range starts. If not
@ -26134,6 +26136,11 @@ class MessageActionItem implements ToJsonable {
/// The message type
class MessageType implements ToJsonable {
/// A debug message.
///
/// @since 3.18.0
static const Debug = MessageType(5);
/// An error message.
static const Error = MessageType(1);
@ -28975,20 +28982,22 @@ class PlaceholderAndRange implements ToJsonable {
/// offset of b is 3 since `𐐀` is represented using two code units in UTF-16.
/// Since 3.17 clients and servers can agree on a different string encoding
/// representation (e.g. UTF-8). The client announces it's supported encoding
/// via the client capability [general.positionEncodings]. The value is an array
/// of position encodings the client supports, with decreasing preference (e.g.
/// the encoding at index `0` is the most preferred one). To stay backwards
/// compatible the only mandatory encoding is UTF-16 represented via the string
/// `utf-16`. The server can pick one of the encodings offered by the client and
/// signals that encoding back to the client via the initialize result's
/// property [capabilities.positionEncoding]. If the string value `utf-16` is
/// missing from the client's capability `general.positionEncodings` servers can
/// safely assume that the client supports UTF-16. If the server omits the
/// position encoding in its initialize result the encoding defaults to the
/// string value `utf-16`. Implementation considerations: since the conversion
/// from one encoding into another requires the content of the file / line the
/// conversion is best done where the file is read which is usually on the
/// server side.
/// via the client capability
/// [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).
/// The value is an array of position encodings the client supports, with
/// decreasing preference (e.g. the encoding at index `0` is the most preferred
/// one). To stay backwards compatible the only mandatory encoding is UTF-16
/// represented via the string `utf-16`. The server can pick one of the
/// encodings offered by the client and signals that encoding back to the client
/// via the initialize result's property
/// [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities).
/// If the string value `utf-16` is missing from the client's capability
/// `general.positionEncodings` servers can safely assume that the client
/// supports UTF-16. If the server omits the position encoding in its initialize
/// result the encoding defaults to the string value `utf-16`. Implementation
/// considerations: since the conversion from one encoding into another requires
/// the content of the file / line the conversion is best done where the file is
/// read which is usually on the server side.
///
/// Positions are line end character agnostic. So you can not specify a position
/// that denotes `\r|\n` or `\n|` where `|` represents the character offset.
@ -29082,12 +29091,12 @@ class PositionEncodingKind implements ToJsonable {
/// Character offsets count UTF-32 code units.
///
/// Implementation note: these are the same as Unicode code points,
/// Implementation note: these are the same as Unicode codepoints,
/// so this `PositionEncodingKind` may also be used for an encoding-agnostic
/// representation of character offsets.
static const UTF32 = PositionEncodingKind('utf-32');
/// Character offsets count UTF-8 code units.
/// Character offsets count UTF-8 code units (e.g. bytes).
static const UTF8 = PositionEncodingKind('utf-8');
final String _value;
@ -34440,7 +34449,7 @@ class ShowDocumentClientCapabilities implements ToJsonable {
}
}
/// Params to show a document.
/// Params to show a resource in the UI.
///
/// @since 3.16.0
class ShowDocumentParams implements ToJsonable {
@ -34449,9 +34458,9 @@ class ShowDocumentParams implements ToJsonable {
ShowDocumentParams.fromJson,
);
/// Indicates to show the resource in an external program. To show for example
/// `https://code.visualstudio.com/` in the default WEB browser set `external`
/// to `true`.
/// Indicates to show the resource in an external program. To show, for
/// example, `https://code.visualstudio.com/`
/// in the default WEB browser set `external` to `true`.
final bool? external;
/// An optional selection range if the document is a text document. Clients
@ -34464,7 +34473,7 @@ class ShowDocumentParams implements ToJsonable {
/// external program is started.
final bool? takeFocus;
/// The document uri to show.
/// The uri to show.
final LSPUri uri;
ShowDocumentParams({
this.external,
@ -37124,7 +37133,7 @@ class TextDocumentFilter1 implements ToJsonable {
/// A language id, like `typescript`.
final String language;
/// A glob pattern, like `*.{ts,js}`.
/// A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
final String? pattern;
/// A Uri [Uri.scheme], like `file` or `untitled`.
@ -37208,7 +37217,7 @@ class TextDocumentFilter3 implements ToJsonable {
/// A language id, like `typescript`.
final String? language;
/// A glob pattern, like `*.{ts,js}`.
/// A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
final String pattern;
/// A Uri [Uri.scheme], like `file` or `untitled`.
@ -37292,7 +37301,7 @@ class TextDocumentFilterWithScheme implements ToJsonable {
/// A language id, like `typescript`.
final String? language;
/// A glob pattern, like `*.{ts,js}`.
/// A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
final String? pattern;
/// A Uri [Uri.scheme], like `file` or `untitled`.
@ -39917,12 +39926,12 @@ class WorkDoneProgressBegin implements ToJsonable {
/// Optional, more detailed associated progress message. Contains
/// complementary information to the `title`.
///
/// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". If
/// unset, the previous progress message (if any) is still valid.
/// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
/// If unset, the previous progress message (if any) is still valid.
final String? message;
/// Optional progress percentage to display (value 100 is considered 100%). If
/// not provided infinite progress is assumed and clients are allowed to
/// Optional progress percentage to display (value 100 is considered 100%).
/// If not provided infinite progress is assumed and clients are allowed to
/// ignore the `percentage` value in subsequent in report notifications.
///
/// The value should be steadily rising. Clients are free to ignore values
@ -40538,12 +40547,12 @@ class WorkDoneProgressReport implements ToJsonable {
/// Optional, more detailed associated progress message. Contains
/// complementary information to the `title`.
///
/// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". If
/// unset, the previous progress message (if any) is still valid.
/// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
/// If unset, the previous progress message (if any) is still valid.
final String? message;
/// Optional progress percentage to display (value 100 is considered 100%). If
/// not provided infinite progress is assumed and clients are allowed to
/// Optional progress percentage to display (value 100 is considered 100%).
/// If not provided infinite progress is assumed and clients are allowed to
/// ignore the `percentage` value in subsequent in report notifications.
///
/// The value should be steadily rising. Clients are free to ignore values

View file

@ -53,7 +53,7 @@
"kind": "reference",
"name": "ImplementationRegistrationOptions"
},
"documentation": "A request to resolve the implementation locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Definition} or a\nThenable that resolves to such."
"documentation": "A request to resolve the implementation locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Definition} or a Thenable that resolves to such."
},
{
"method": "textDocument/typeDefinition",
@ -105,7 +105,7 @@
"kind": "reference",
"name": "TypeDefinitionRegistrationOptions"
},
"documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Definition} or a\nThenable that resolves to such."
"documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Definition} or a Thenable that resolves to such."
},
{
"method": "workspace/workspaceFolders",
@ -243,6 +243,17 @@
},
"documentation": "A request to provide folding ranges in a document. The request's\nparameter is of type {@link FoldingRangeParams}, the\nresponse is of type {@link FoldingRangeList} or a Thenable\nthat resolves to such."
},
{
"method": "workspace/foldingRange/refresh",
"result": {
"kind": "base",
"name": "null"
},
"messageDirection": "serverToClient",
"documentation": "@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"method": "textDocument/declaration",
"result": {
@ -293,7 +304,7 @@
"kind": "reference",
"name": "DeclarationRegistrationOptions"
},
"documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Declaration}\nor a typed array of {@link DeclarationLink} or a Thenable that resolves\nto such."
"documentation": "A request to resolve the type definition locations of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPositionParams}\nthe response is of type {@link Declaration} or a typed array of {@link DeclarationLink}\nor a Thenable that resolves to such."
},
{
"method": "textDocument/selectionRange",
@ -620,7 +631,7 @@
"kind": "reference",
"name": "FileOperationRegistrationOptions"
},
"documentation": "The will create files request is sent from the client to the server before files are actually\ncreated as long as the creation is triggered from within the client.\n\n@since 3.16.0",
"documentation": "The will create files request is sent from the client to the server before files are actually\ncreated as long as the creation is triggered from within the client.\n\nThe request can return a `WorkspaceEdit` which will be applied to workspace before the\nfiles are created. Hence the `WorkspaceEdit` can not manipulate the content of the file\nto be created.\n\n@since 3.16.0",
"since": "3.16.0"
},
{
@ -975,6 +986,48 @@
"documentation": "The diagnostic refresh request definition.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"method": "textDocument/inlineCompletion",
"result": {
"kind": "or",
"items": [
{
"kind": "reference",
"name": "InlineCompletionList"
},
{
"kind": "array",
"element": {
"kind": "reference",
"name": "InlineCompletionItem"
}
},
{
"kind": "base",
"name": "null"
}
]
},
"messageDirection": "clientToServer",
"params": {
"kind": "reference",
"name": "InlineCompletionParams"
},
"partialResult": {
"kind": "array",
"element": {
"kind": "reference",
"name": "InlineCompletionItem"
}
},
"registrationOptions": {
"kind": "reference",
"name": "InlineCompletionRegistrationOptions"
},
"documentation": "A request to provide inline completions in a document. The request's parameter is of\ntype {@link InlineCompletionParams}, the response is of type\n{@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"method": "client/registerCapability",
"result": {
@ -1232,7 +1285,7 @@
"kind": "reference",
"name": "DefinitionRegistrationOptions"
},
"documentation": "A request to resolve the definition location of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPosition]\n(#TextDocumentPosition) the response is of either type {@link Definition}\nor a typed array of {@link DefinitionLink} or a Thenable that resolves\nto such."
"documentation": "A request to resolve the definition location of a symbol at a given text\ndocument position. The request's parameter is of type {@link TextDocumentPosition}\nthe response is of either type {@link Definition} or a typed array of\n{@link DefinitionLink} or a Thenable that resolves to such."
},
{
"method": "textDocument/references",
@ -1304,7 +1357,7 @@
"kind": "reference",
"name": "DocumentHighlightRegistrationOptions"
},
"documentation": "Request to resolve a {@link DocumentHighlight} for a given\ntext document position. The request's parameter is of type [TextDocumentPosition]\n(#TextDocumentPosition) the request response is of type [DocumentHighlight[]]\n(#DocumentHighlight) or a Thenable that resolves to such."
"documentation": "Request to resolve a {@link DocumentHighlight} for a given\ntext document position. The request's parameter is of type {@link TextDocumentPosition}\nthe request response is an array of type {@link DocumentHighlight}\nor a Thenable that resolves to such."
},
{
"method": "textDocument/documentSymbol",
@ -1664,6 +1717,37 @@
},
"documentation": "A request to format a range in a document."
},
{
"method": "textDocument/rangesFormatting",
"result": {
"kind": "or",
"items": [
{
"kind": "array",
"element": {
"kind": "reference",
"name": "TextEdit"
}
},
{
"kind": "base",
"name": "null"
}
]
},
"messageDirection": "clientToServer",
"params": {
"kind": "reference",
"name": "DocumentRangesFormattingParams"
},
"registrationOptions": {
"kind": "reference",
"name": "DocumentRangeFormattingRegistrationOptions"
},
"documentation": "A request to format ranges in a document.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"method": "textDocument/onTypeFormatting",
"result": {
@ -3061,7 +3145,7 @@
"kind": "base",
"name": "URI"
},
"documentation": "The document uri to show."
"documentation": "The uri to show."
},
{
"name": "external",
@ -3070,7 +3154,7 @@
"name": "boolean"
},
"optional": true,
"documentation": "Indicates to show the resource in an external program.\nTo show for example `https://code.visualstudio.com/`\nin the default WEB browser set `external` to `true`."
"documentation": "Indicates to show the resource in an external program.\nTo show, for example, `https://code.visualstudio.com/`\nin the default WEB browser set `external` to `true`."
},
{
"name": "takeFocus",
@ -3091,7 +3175,7 @@
"documentation": "An optional selection range if the document is a text\ndocument. Clients might ignore the property if an\nexternal program is started or the file is not a text\nfile."
}
],
"documentation": "Params to show a document.\n\n@since 3.16.0",
"documentation": "Params to show a resource in the UI.\n\n@since 3.16.0",
"since": "3.16.0"
},
{
@ -4035,6 +4119,128 @@
"documentation": "The params sent in a close notebook document notification.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "InlineCompletionParams",
"properties": [
{
"name": "context",
"type": {
"kind": "reference",
"name": "InlineCompletionContext"
},
"documentation": "Additional information about the context in which inline completions were\nrequested."
}
],
"extends": [
{
"kind": "reference",
"name": "TextDocumentPositionParams"
}
],
"mixins": [
{
"kind": "reference",
"name": "WorkDoneProgressParams"
}
],
"documentation": "A parameter literal used in inline completion requests.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "InlineCompletionList",
"properties": [
{
"name": "items",
"type": {
"kind": "array",
"element": {
"kind": "reference",
"name": "InlineCompletionItem"
}
},
"documentation": "The inline completion items"
}
],
"documentation": "Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "InlineCompletionItem",
"properties": [
{
"name": "insertText",
"type": {
"kind": "or",
"items": [
{
"kind": "base",
"name": "string"
},
{
"kind": "reference",
"name": "StringValue"
}
]
},
"documentation": "The text to replace the range with. Must be set."
},
{
"name": "filterText",
"type": {
"kind": "base",
"name": "string"
},
"optional": true,
"documentation": "A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used."
},
{
"name": "range",
"type": {
"kind": "reference",
"name": "Range"
},
"optional": true,
"documentation": "The range to replace. Must begin and end on the same line."
},
{
"name": "command",
"type": {
"kind": "reference",
"name": "Command"
},
"optional": true,
"documentation": "An optional {@link Command} that is executed *after* inserting this completion."
}
],
"documentation": "An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "InlineCompletionRegistrationOptions",
"properties": [],
"extends": [
{
"kind": "reference",
"name": "InlineCompletionOptions"
},
{
"kind": "reference",
"name": "TextDocumentRegistrationOptions"
}
],
"mixins": [
{
"kind": "reference",
"name": "StaticRegistrationOptions"
}
],
"documentation": "Inline completion options used during static or dynamic registration.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "RegistrationParams",
"properties": [
@ -5623,7 +5829,7 @@
"name": "LSPAny"
},
"optional": true,
"documentation": "A data entry field that is preserved on a code lens item between\na {@link CodeLensRequest} and a [CodeLensResolveRequest]\n(#CodeLensResolveRequest)"
"documentation": "A data entry field that is preserved on a code lens item between\na {@link CodeLensRequest} and a {@link CodeLensResolveRequest}"
}
],
"documentation": "A code lens represents a {@link Command command} that should be shown along with\nsource text, like the number of references, a way to run tests, etc.\n\nA code lens is _unresolved_ when no command is associated to it. For performance\nreasons the creation of a code lens and resolving should be done in two stages."
@ -5682,7 +5888,7 @@
"name": "target",
"type": {
"kind": "base",
"name": "string"
"name": "URI"
},
"optional": true,
"documentation": "The uri this link points to. If missing a resolve request is sent later."
@ -5818,6 +6024,47 @@
],
"documentation": "Registration options for a {@link DocumentRangeFormattingRequest}."
},
{
"name": "DocumentRangesFormattingParams",
"properties": [
{
"name": "textDocument",
"type": {
"kind": "reference",
"name": "TextDocumentIdentifier"
},
"documentation": "The document to format."
},
{
"name": "ranges",
"type": {
"kind": "array",
"element": {
"kind": "reference",
"name": "Range"
}
},
"documentation": "The ranges to format"
},
{
"name": "options",
"type": {
"kind": "reference",
"name": "FormattingOptions"
},
"documentation": "The format options"
}
],
"mixins": [
{
"kind": "reference",
"name": "WorkDoneProgressParams"
}
],
"documentation": "The parameters of a {@link DocumentRangesFormattingRequest}.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "DocumentOnTypeFormattingParams",
"properties": [
@ -6400,7 +6647,7 @@
"name": "scopeUri",
"type": {
"kind": "base",
"name": "string"
"name": "URI"
},
"optional": true,
"documentation": "The scope to get the configuration section for."
@ -6518,7 +6765,7 @@
"documentation": "Character offset on a line in a document (zero-based).\n\nThe meaning of this offset is determined by the negotiated\n`PositionEncodingKind`.\n\nIf the character value is greater than the line length it defaults back to the\nline length."
}
],
"documentation": "Position in a text document expressed as zero-based line and character\noffset. Prior to 3.17 the offsets were always based on a UTF-16 string\nrepresentation. So a string of the form `a𐐀b` the character offset of the\ncharacter `a` is 0, the character offset of `𐐀` is 1 and the character\noffset of b is 3 since `𐐀` is represented using two code units in UTF-16.\nSince 3.17 clients and servers can agree on a different string encoding\nrepresentation (e.g. UTF-8). The client announces it's supported encoding\nvia the client capability [`general.positionEncodings`](#clientCapabilities).\nThe value is an array of position encodings the client supports, with\ndecreasing preference (e.g. the encoding at index `0` is the most preferred\none). To stay backwards compatible the only mandatory encoding is UTF-16\nrepresented via the string `utf-16`. The server can pick one of the\nencodings offered by the client and signals that encoding back to the\nclient via the initialize result's property\n[`capabilities.positionEncoding`](#serverCapabilities). If the string value\n`utf-16` is missing from the client's capability `general.positionEncodings`\nservers can safely assume that the client supports UTF-16. If the server\nomits the position encoding in its initialize result the encoding defaults\nto the string value `utf-16`. Implementation considerations: since the\nconversion from one encoding into another requires the content of the\nfile / line the conversion is best done where the file is read which is\nusually on the server side.\n\nPositions are line end character agnostic. So you can not specify a position\nthat denotes `\\r|\\n` or `\\n|` where `|` represents the character offset.\n\n@since 3.17.0 - support for negotiated position encoding.",
"documentation": "Position in a text document expressed as zero-based line and character\noffset. Prior to 3.17 the offsets were always based on a UTF-16 string\nrepresentation. So a string of the form `a𐐀b` the character offset of the\ncharacter `a` is 0, the character offset of `𐐀` is 1 and the character\noffset of b is 3 since `𐐀` is represented using two code units in UTF-16.\nSince 3.17 clients and servers can agree on a different string encoding\nrepresentation (e.g. UTF-8). The client announces it's supported encoding\nvia the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).\nThe value is an array of position encodings the client supports, with\ndecreasing preference (e.g. the encoding at index `0` is the most preferred\none). To stay backwards compatible the only mandatory encoding is UTF-16\nrepresented via the string `utf-16`. The server can pick one of the\nencodings offered by the client and signals that encoding back to the\nclient via the initialize result's property\n[`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value\n`utf-16` is missing from the client's capability `general.positionEncodings`\nservers can safely assume that the client supports UTF-16. If the server\nomits the position encoding in its initialize result the encoding defaults\nto the string value `utf-16`. Implementation considerations: since the\nconversion from one encoding into another requires the content of the\nfile / line the conversion is best done where the file is read which is\nusually on the server side.\n\nPositions are line end character agnostic. So you can not specify a position\nthat denotes `\\r|\\n` or `\\n|` where `|` represents the character offset.\n\n@since 3.17.0 - support for negotiated position encoding.",
"since": "3.17.0 - support for negotiated position encoding."
},
{
@ -7594,6 +7841,68 @@
"documentation": "A literal to identify a notebook document in the client.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "InlineCompletionContext",
"properties": [
{
"name": "triggerKind",
"type": {
"kind": "reference",
"name": "InlineCompletionTriggerKind"
},
"documentation": "Describes how the inline completion was triggered."
},
{
"name": "selectedCompletionInfo",
"type": {
"kind": "reference",
"name": "SelectedCompletionInfo"
},
"optional": true,
"documentation": "Provides information about the currently selected item in the autocomplete widget if it is visible."
}
],
"documentation": "Provides information about the context in which an inline completion was requested.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "StringValue",
"properties": [
{
"name": "kind",
"type": {
"kind": "stringLiteral",
"value": "snippet"
},
"documentation": "The kind of string value."
},
{
"name": "value",
"type": {
"kind": "base",
"name": "string"
},
"documentation": "The snippet string."
}
],
"documentation": "A string value used as a snippet is a template which allows to insert text\nand to control the editor cursor when insertion happens.\n\nA snippet can define tab stops and placeholders with `$1`, `$2`\nand `${3:foo}`. `$0` defines the final tab stop, it defaults to\nthe end of the snippet. Variables are defined with `$name` and\n`${name:default value}`.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "InlineCompletionOptions",
"mixins": [
{
"kind": "reference",
"name": "WorkDoneProgressOptions"
}
],
"properties": [],
"documentation": "Inline completion options used during static registration.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "Registration",
"properties": [
@ -8398,6 +8707,26 @@
"documentation": "The server has support for pull model diagnostics.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "inlineCompletionProvider",
"type": {
"kind": "or",
"items": [
{
"kind": "base",
"name": "boolean"
},
{
"kind": "reference",
"name": "InlineCompletionOptions"
}
]
},
"optional": true,
"documentation": "Inline completion options used during static registration.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "workspace",
"type": {
@ -9231,7 +9560,19 @@
},
{
"name": "DocumentRangeFormattingOptions",
"properties": [],
"properties": [
{
"name": "rangesSupport",
"type": {
"kind": "base",
"name": "boolean"
},
"optional": true,
"documentation": "Whether the server supports formatting multiple ranges at once.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
}
],
"mixins": [
{
"kind": "reference",
@ -9671,6 +10012,30 @@
"documentation": "A change describing how to move a `NotebookCell`\narray from state S to S'.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "SelectedCompletionInfo",
"properties": [
{
"name": "range",
"type": {
"kind": "reference",
"name": "Range"
},
"documentation": "The range that will be replaced if this completion item is accepted."
},
{
"name": "text",
"type": {
"kind": "base",
"name": "string"
},
"documentation": "The text the range will be replaced with if this completion is accepted."
}
],
"documentation": "Describes the currently selected completion item.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "ClientCapabilities",
"properties": [
@ -10316,6 +10681,17 @@
"optional": true,
"documentation": "Capabilities specific to the diagnostic requests scoped to the\nworkspace.\n\n@since 3.17.0.",
"since": "3.17.0."
},
{
"name": "foldingRange",
"type": {
"kind": "reference",
"name": "FoldingRangeWorkspaceClientCapabilities"
},
"optional": true,
"documentation": "Capabilities specific to the folding range requests scoped to the workspace.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
}
],
"documentation": "Workspace specific client capabilities."
@ -10606,6 +10982,17 @@
"optional": true,
"documentation": "Capabilities specific to the diagnostic pull model.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "inlineCompletion",
"type": {
"kind": "reference",
"name": "InlineCompletionClientCapabilities"
},
"optional": true,
"documentation": "Client capabilities specific to inline completions.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
}
],
"documentation": "Text document specific client capabilities."
@ -11124,6 +11511,25 @@
"documentation": "Workspace client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "FoldingRangeWorkspaceClientCapabilities",
"properties": [
{
"name": "refreshSupport",
"type": {
"kind": "base",
"name": "boolean"
},
"optional": true,
"documentation": "Whether the client implementation supports a refresh request sent from the\nserver to the client.\n\nNote that this event is global and will force the client to refresh all\nfolding ranges currently shown. It should be used with absolute care and is\nuseful for situation where a server for example detects a project wide\nchange that requires such a calculation.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
}
],
"documentation": "Client workspace capabilities specific to folding ranges\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "TextDocumentSyncClientCapabilities",
"properties": [
@ -11912,6 +12318,17 @@
},
"optional": true,
"documentation": "Whether range formatting supports dynamic registration."
},
{
"name": "rangesSupport",
"type": {
"kind": "base",
"name": "boolean"
},
"optional": true,
"documentation": "Whether the client supports formatting multiple ranges at once.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
}
],
"documentation": "Client capabilities of a {@link DocumentRangeFormattingRequest}."
@ -12430,6 +12847,23 @@
"documentation": "Client capabilities specific to diagnostic pull requests.\n\n@since 3.17.0",
"since": "3.17.0"
},
{
"name": "InlineCompletionClientCapabilities",
"properties": [
{
"name": "dynamicRegistration",
"type": {
"kind": "base",
"name": "boolean"
},
"optional": true,
"documentation": "Whether implementation supports dynamic registration for inline completion providers."
}
],
"documentation": "Client capabilities specific to inline completions.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "NotebookDocumentSyncClientCapabilities",
"properties": [
@ -13077,6 +13511,12 @@
"name": "Log",
"value": 4,
"documentation": "A log message."
},
{
"name": "Debug",
"value": 5,
"documentation": "A debug message.\n\n@since 3.18.0",
"since": "3.18.0"
}
],
"documentation": "The message type"
@ -13424,6 +13864,28 @@
],
"documentation": "Describes the content type that a client supports in various\nresult literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n\nPlease note that `MarkupKinds` must not start with a `$`. This kinds\nare reserved for internal usage."
},
{
"name": "InlineCompletionTriggerKind",
"type": {
"kind": "base",
"name": "uinteger"
},
"values": [
{
"name": "Invoked",
"value": 0,
"documentation": "Completion was triggered explicitly by a user gesture."
},
{
"name": "Automatic",
"value": 1,
"documentation": "Completion was triggered automatically while editing."
}
],
"documentation": "Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.\n\n@since 3.18.0\n@proposed",
"since": "3.18.0",
"proposed": true
},
{
"name": "PositionEncodingKind",
"type": {
@ -13434,7 +13896,7 @@
{
"name": "UTF8",
"value": "utf-8",
"documentation": "Character offsets count UTF-8 code units."
"documentation": "Character offsets count UTF-8 code units (e.g. bytes)."
},
{
"name": "UTF16",
@ -13444,7 +13906,7 @@
{
"name": "UTF32",
"value": "utf-32",
"documentation": "Character offsets count UTF-32 code units.\n\nImplementation note: these are the same as Unicode code points,\nso this `PositionEncodingKind` may also be used for an\nencoding-agnostic representation of character offsets."
"documentation": "Character offsets count UTF-32 code units.\n\nImplementation note: these are the same as Unicode codepoints,\nso this `PositionEncodingKind` may also be used for an\nencoding-agnostic representation of character offsets."
}
],
"supportsCustomValues": true,
@ -14175,7 +14637,7 @@
"name": "string"
},
"optional": true,
"documentation": "A glob pattern, like `*.{ts,js}`."
"documentation": "A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples."
}
]
}
@ -14208,7 +14670,7 @@
"name": "string"
},
"optional": true,
"documentation": "A glob pattern, like `*.{ts,js}`."
"documentation": "A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples."
}
]
}
@ -14241,7 +14703,7 @@
"kind": "base",
"name": "string"
},
"documentation": "A glob pattern, like `*.{ts,js}`."
"documentation": "A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples."
}
]
}