css-variable-lsp 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -9
- package/package.json +5 -2
- package/server/out/cascadeAndInline.test.js +67 -0
- package/server/out/cascadeAndInline.test.js.map +1 -0
- package/server/out/cssVariableManager.js +390 -0
- package/server/out/cssVariableManager.js.map +1 -0
- package/server/out/domTree.js +115 -0
- package/server/out/domTree.js.map +1 -0
- package/server/out/domTree.test.js +77 -0
- package/server/out/domTree.test.js.map +1 -0
- package/server/out/fileLifecycle.test.js +163 -0
- package/server/out/fileLifecycle.test.js.map +1 -0
- package/server/out/fileTypesAndUpdates.test.js +78 -0
- package/server/out/fileTypesAndUpdates.test.js.map +1 -0
- package/server/out/htmlComments.test.js +180 -0
- package/server/out/htmlComments.test.js.map +1 -0
- package/server/out/server/src/server.js +1 -0
- package/server/out/server/src/server.js.map +1 -1
- package/server/out/server.js +458 -0
- package/server/out/server.js.map +1 -0
- package/server/out/specificity.js +138 -0
- package/server/out/specificity.js.map +1 -0
- package/server/out/specificity.test.js +66 -0
- package/server/out/specificity.test.js.map +1 -0
- package/server/out/test.js +112 -0
- package/server/out/test.js.map +1 -0
- package/server/out/tsconfig.tsbuildinfo +1 -1
- package/server/src/server.ts +2 -0
- package/server/tsconfig.tsbuildinfo +1 -0
- package/client/node_modules/.package-lock.json +0 -110
- package/client/node_modules/@types/node/LICENSE +0 -21
- package/client/node_modules/@types/node/README.md +0 -15
- package/client/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/client/node_modules/@types/node/assert.d.ts +0 -1005
- package/client/node_modules/@types/node/async_hooks.d.ts +0 -586
- package/client/node_modules/@types/node/buffer.buffer.d.ts +0 -457
- package/client/node_modules/@types/node/buffer.d.ts +0 -1901
- package/client/node_modules/@types/node/child_process.d.ts +0 -1453
- package/client/node_modules/@types/node/cluster.d.ts +0 -578
- package/client/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/client/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/client/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/client/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/client/node_modules/@types/node/console.d.ts +0 -452
- package/client/node_modules/@types/node/constants.d.ts +0 -21
- package/client/node_modules/@types/node/crypto.d.ts +0 -4504
- package/client/node_modules/@types/node/dgram.d.ts +0 -596
- package/client/node_modules/@types/node/diagnostics_channel.d.ts +0 -551
- package/client/node_modules/@types/node/dns/promises.d.ts +0 -477
- package/client/node_modules/@types/node/dns.d.ts +0 -860
- package/client/node_modules/@types/node/domain.d.ts +0 -170
- package/client/node_modules/@types/node/events.d.ts +0 -863
- package/client/node_modules/@types/node/fs/promises.d.ts +0 -1208
- package/client/node_modules/@types/node/fs.d.ts +0 -4332
- package/client/node_modules/@types/node/globals.d.ts +0 -170
- package/client/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/client/node_modules/@types/node/http.d.ts +0 -1919
- package/client/node_modules/@types/node/http2.d.ts +0 -2580
- package/client/node_modules/@types/node/https.d.ts +0 -549
- package/client/node_modules/@types/node/index.d.ts +0 -92
- package/client/node_modules/@types/node/inspector.generated.d.ts +0 -2775
- package/client/node_modules/@types/node/module.d.ts +0 -503
- package/client/node_modules/@types/node/net.d.ts +0 -924
- package/client/node_modules/@types/node/os.d.ts +0 -480
- package/client/node_modules/@types/node/package.json +0 -145
- package/client/node_modules/@types/node/path.d.ts +0 -191
- package/client/node_modules/@types/node/perf_hooks.d.ts +0 -860
- package/client/node_modules/@types/node/process.d.ts +0 -1632
- package/client/node_modules/@types/node/punycode.d.ts +0 -117
- package/client/node_modules/@types/node/querystring.d.ts +0 -140
- package/client/node_modules/@types/node/readline/promises.d.ts +0 -154
- package/client/node_modules/@types/node/readline.d.ts +0 -715
- package/client/node_modules/@types/node/repl.d.ts +0 -430
- package/client/node_modules/@types/node/stream/consumers.d.ts +0 -38
- package/client/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/client/node_modules/@types/node/stream/web.d.ts +0 -527
- package/client/node_modules/@types/node/stream.d.ts +0 -1680
- package/client/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/client/node_modules/@types/node/test.d.ts +0 -1208
- package/client/node_modules/@types/node/timers/promises.d.ts +0 -108
- package/client/node_modules/@types/node/timers.d.ts +0 -286
- package/client/node_modules/@types/node/tls.d.ts +0 -1204
- package/client/node_modules/@types/node/trace_events.d.ts +0 -171
- package/client/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -455
- package/client/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/client/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/client/node_modules/@types/node/tty.d.ts +0 -206
- package/client/node_modules/@types/node/url.d.ts +0 -957
- package/client/node_modules/@types/node/util.d.ts +0 -2083
- package/client/node_modules/@types/node/v8.d.ts +0 -753
- package/client/node_modules/@types/node/vm.d.ts +0 -704
- package/client/node_modules/@types/node/wasi.d.ts +0 -160
- package/client/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
- package/client/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/client/node_modules/@types/node/web-globals/events.d.ts +0 -81
- package/client/node_modules/@types/node/web-globals/fetch.d.ts +0 -38
- package/client/node_modules/@types/node/worker_threads.d.ts +0 -698
- package/client/node_modules/@types/node/zlib.d.ts +0 -517
- package/client/node_modules/@types/vscode/LICENSE +0 -21
- package/client/node_modules/@types/vscode/README.md +0 -15
- package/client/node_modules/@types/vscode/index.d.ts +0 -21145
- package/client/node_modules/@types/vscode/package.json +0 -26
- package/client/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/client/node_modules/balanced-match/LICENSE.md +0 -21
- package/client/node_modules/balanced-match/README.md +0 -97
- package/client/node_modules/balanced-match/index.js +0 -62
- package/client/node_modules/balanced-match/package.json +0 -48
- package/client/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
- package/client/node_modules/brace-expansion/LICENSE +0 -21
- package/client/node_modules/brace-expansion/README.md +0 -135
- package/client/node_modules/brace-expansion/index.js +0 -203
- package/client/node_modules/brace-expansion/package.json +0 -49
- package/client/node_modules/minimatch/LICENSE +0 -15
- package/client/node_modules/minimatch/README.md +0 -259
- package/client/node_modules/minimatch/lib/path.js +0 -4
- package/client/node_modules/minimatch/minimatch.js +0 -944
- package/client/node_modules/minimatch/package.json +0 -35
- package/client/node_modules/semver/LICENSE +0 -15
- package/client/node_modules/semver/README.md +0 -664
- package/client/node_modules/semver/bin/semver.js +0 -191
- package/client/node_modules/semver/classes/comparator.js +0 -143
- package/client/node_modules/semver/classes/index.js +0 -7
- package/client/node_modules/semver/classes/range.js +0 -557
- package/client/node_modules/semver/classes/semver.js +0 -333
- package/client/node_modules/semver/functions/clean.js +0 -8
- package/client/node_modules/semver/functions/cmp.js +0 -54
- package/client/node_modules/semver/functions/coerce.js +0 -62
- package/client/node_modules/semver/functions/compare-build.js +0 -9
- package/client/node_modules/semver/functions/compare-loose.js +0 -5
- package/client/node_modules/semver/functions/compare.js +0 -7
- package/client/node_modules/semver/functions/diff.js +0 -60
- package/client/node_modules/semver/functions/eq.js +0 -5
- package/client/node_modules/semver/functions/gt.js +0 -5
- package/client/node_modules/semver/functions/gte.js +0 -5
- package/client/node_modules/semver/functions/inc.js +0 -21
- package/client/node_modules/semver/functions/lt.js +0 -5
- package/client/node_modules/semver/functions/lte.js +0 -5
- package/client/node_modules/semver/functions/major.js +0 -5
- package/client/node_modules/semver/functions/minor.js +0 -5
- package/client/node_modules/semver/functions/neq.js +0 -5
- package/client/node_modules/semver/functions/parse.js +0 -18
- package/client/node_modules/semver/functions/patch.js +0 -5
- package/client/node_modules/semver/functions/prerelease.js +0 -8
- package/client/node_modules/semver/functions/rcompare.js +0 -5
- package/client/node_modules/semver/functions/rsort.js +0 -5
- package/client/node_modules/semver/functions/satisfies.js +0 -12
- package/client/node_modules/semver/functions/sort.js +0 -5
- package/client/node_modules/semver/functions/valid.js +0 -8
- package/client/node_modules/semver/index.js +0 -91
- package/client/node_modules/semver/internal/constants.js +0 -37
- package/client/node_modules/semver/internal/debug.js +0 -11
- package/client/node_modules/semver/internal/identifiers.js +0 -29
- package/client/node_modules/semver/internal/lrucache.js +0 -42
- package/client/node_modules/semver/internal/parse-options.js +0 -17
- package/client/node_modules/semver/internal/re.js +0 -223
- package/client/node_modules/semver/package.json +0 -78
- package/client/node_modules/semver/preload.js +0 -4
- package/client/node_modules/semver/range.bnf +0 -16
- package/client/node_modules/semver/ranges/gtr.js +0 -6
- package/client/node_modules/semver/ranges/intersects.js +0 -9
- package/client/node_modules/semver/ranges/ltr.js +0 -6
- package/client/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/client/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/client/node_modules/semver/ranges/min-version.js +0 -63
- package/client/node_modules/semver/ranges/outside.js +0 -82
- package/client/node_modules/semver/ranges/simplify.js +0 -49
- package/client/node_modules/semver/ranges/subset.js +0 -249
- package/client/node_modules/semver/ranges/to-comparators.js +0 -10
- package/client/node_modules/semver/ranges/valid.js +0 -13
- package/client/node_modules/undici-types/README.md +0 -6
- package/client/node_modules/undici-types/agent.d.ts +0 -31
- package/client/node_modules/undici-types/api.d.ts +0 -43
- package/client/node_modules/undici-types/balanced-pool.d.ts +0 -18
- package/client/node_modules/undici-types/cache.d.ts +0 -36
- package/client/node_modules/undici-types/client.d.ts +0 -97
- package/client/node_modules/undici-types/connector.d.ts +0 -34
- package/client/node_modules/undici-types/content-type.d.ts +0 -21
- package/client/node_modules/undici-types/cookies.d.ts +0 -28
- package/client/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
- package/client/node_modules/undici-types/dispatcher.d.ts +0 -241
- package/client/node_modules/undici-types/errors.d.ts +0 -128
- package/client/node_modules/undici-types/fetch.d.ts +0 -209
- package/client/node_modules/undici-types/file.d.ts +0 -39
- package/client/node_modules/undici-types/filereader.d.ts +0 -54
- package/client/node_modules/undici-types/formdata.d.ts +0 -108
- package/client/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/client/node_modules/undici-types/global-origin.d.ts +0 -7
- package/client/node_modules/undici-types/handlers.d.ts +0 -9
- package/client/node_modules/undici-types/header.d.ts +0 -4
- package/client/node_modules/undici-types/index.d.ts +0 -63
- package/client/node_modules/undici-types/interceptors.d.ts +0 -5
- package/client/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/client/node_modules/undici-types/mock-client.d.ts +0 -25
- package/client/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/client/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/client/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/client/node_modules/undici-types/package.json +0 -55
- package/client/node_modules/undici-types/patch.d.ts +0 -71
- package/client/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/client/node_modules/undici-types/pool.d.ts +0 -28
- package/client/node_modules/undici-types/proxy-agent.d.ts +0 -30
- package/client/node_modules/undici-types/readable.d.ts +0 -61
- package/client/node_modules/undici-types/webidl.d.ts +0 -220
- package/client/node_modules/undici-types/websocket.d.ts +0 -131
- package/client/node_modules/vscode-jsonrpc/License.txt +0 -11
- package/client/node_modules/vscode-jsonrpc/README.md +0 -69
- package/client/node_modules/vscode-jsonrpc/browser.d.ts +0 -6
- package/client/node_modules/vscode-jsonrpc/browser.js +0 -7
- package/client/node_modules/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
- package/client/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -76
- package/client/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +0 -12
- package/client/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -156
- package/client/node_modules/vscode-jsonrpc/lib/common/api.d.ts +0 -14
- package/client/node_modules/vscode-jsonrpc/lib/common/api.js +0 -81
- package/client/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
- package/client/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -96
- package/client/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +0 -358
- package/client/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -1212
- package/client/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
- package/client/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -16
- package/client/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
- package/client/node_modules/vscode-jsonrpc/lib/common/encoding.js +0 -70
- package/client/node_modules/vscode-jsonrpc/lib/common/events.d.ts +0 -39
- package/client/node_modules/vscode-jsonrpc/lib/common/events.js +0 -128
- package/client/node_modules/vscode-jsonrpc/lib/common/is.d.ts +0 -7
- package/client/node_modules/vscode-jsonrpc/lib/common/is.js +0 -35
- package/client/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -53
- package/client/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -398
- package/client/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
- package/client/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -152
- package/client/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
- package/client/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -197
- package/client/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
- package/client/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -115
- package/client/node_modules/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
- package/client/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -306
- package/client/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
- package/client/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -23
- package/client/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
- package/client/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -68
- package/client/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
- package/client/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -76
- package/client/node_modules/vscode-jsonrpc/lib/node/main.d.ts +0 -63
- package/client/node_modules/vscode-jsonrpc/lib/node/main.js +0 -257
- package/client/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +0 -13
- package/client/node_modules/vscode-jsonrpc/lib/node/ril.js +0 -161
- package/client/node_modules/vscode-jsonrpc/node.cmd +0 -5
- package/client/node_modules/vscode-jsonrpc/node.d.ts +0 -6
- package/client/node_modules/vscode-jsonrpc/node.js +0 -7
- package/client/node_modules/vscode-jsonrpc/package.json +0 -45
- package/client/node_modules/vscode-jsonrpc/thirdpartynotices.txt +0 -16
- package/client/node_modules/vscode-jsonrpc/typings/thenable.d.ts +0 -5
- package/client/node_modules/vscode-languageclient/License.txt +0 -11
- package/client/node_modules/vscode-languageclient/README.md +0 -17
- package/client/node_modules/vscode-languageclient/browser.d.ts +0 -6
- package/client/node_modules/vscode-languageclient/browser.js +0 -7
- package/client/node_modules/vscode-languageclient/lib/browser/main.d.ts +0 -8
- package/client/node_modules/vscode-languageclient/lib/browser/main.js +0 -37
- package/client/node_modules/vscode-languageclient/lib/common/api.d.ts +0 -36
- package/client/node_modules/vscode-languageclient/lib/common/api.js +0 -27
- package/client/node_modules/vscode-languageclient/lib/common/callHierarchy.d.ts +0 -37
- package/client/node_modules/vscode-languageclient/lib/common/callHierarchy.js +0 -97
- package/client/node_modules/vscode-languageclient/lib/common/client.d.ts +0 -476
- package/client/node_modules/vscode-languageclient/lib/common/client.js +0 -1600
- package/client/node_modules/vscode-languageclient/lib/common/codeAction.d.ts +0 -19
- package/client/node_modules/vscode-languageclient/lib/common/codeAction.js +0 -99
- package/client/node_modules/vscode-languageclient/lib/common/codeConverter.d.ts +0 -78
- package/client/node_modules/vscode-languageclient/lib/common/codeConverter.js +0 -876
- package/client/node_modules/vscode-languageclient/lib/common/codeLens.d.ts +0 -23
- package/client/node_modules/vscode-languageclient/lib/common/codeLens.js +0 -78
- package/client/node_modules/vscode-languageclient/lib/common/colorProvider.d.ts +0 -25
- package/client/node_modules/vscode-languageclient/lib/common/colorProvider.js +0 -74
- package/client/node_modules/vscode-languageclient/lib/common/completion.d.ts +0 -20
- package/client/node_modules/vscode-languageclient/lib/common/completion.js +0 -126
- package/client/node_modules/vscode-languageclient/lib/common/configuration.d.ts +0 -69
- package/client/node_modules/vscode-languageclient/lib/common/configuration.js +0 -209
- package/client/node_modules/vscode-languageclient/lib/common/declaration.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/declaration.js +0 -54
- package/client/node_modules/vscode-languageclient/lib/common/definition.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/definition.js +0 -55
- package/client/node_modules/vscode-languageclient/lib/common/diagnostic.d.ts +0 -122
- package/client/node_modules/vscode-languageclient/lib/common/diagnostic.js +0 -814
- package/client/node_modules/vscode-languageclient/lib/common/documentHighlight.d.ts +0 -15
- package/client/node_modules/vscode-languageclient/lib/common/documentHighlight.js +0 -50
- package/client/node_modules/vscode-languageclient/lib/common/documentLink.d.ts +0 -19
- package/client/node_modules/vscode-languageclient/lib/common/documentLink.js +0 -71
- package/client/node_modules/vscode-languageclient/lib/common/documentSymbol.d.ts +0 -17
- package/client/node_modules/vscode-languageclient/lib/common/documentSymbol.js +0 -104
- package/client/node_modules/vscode-languageclient/lib/common/executeCommand.d.ts +0 -21
- package/client/node_modules/vscode-languageclient/lib/common/executeCommand.js +0 -72
- package/client/node_modules/vscode-languageclient/lib/common/features.d.ts +0 -418
- package/client/node_modules/vscode-languageclient/lib/common/features.js +0 -291
- package/client/node_modules/vscode-languageclient/lib/common/fileOperations.d.ts +0 -116
- package/client/node_modules/vscode-languageclient/lib/common/fileOperations.js +0 -333
- package/client/node_modules/vscode-languageclient/lib/common/fileSystemWatcher.d.ts +0 -18
- package/client/node_modules/vscode-languageclient/lib/common/fileSystemWatcher.js +0 -95
- package/client/node_modules/vscode-languageclient/lib/common/foldingRange.d.ts +0 -19
- package/client/node_modules/vscode-languageclient/lib/common/foldingRange.js +0 -65
- package/client/node_modules/vscode-languageclient/lib/common/formatting.d.ts +0 -39
- package/client/node_modules/vscode-languageclient/lib/common/formatting.js +0 -182
- package/client/node_modules/vscode-languageclient/lib/common/hover.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/hover.js +0 -58
- package/client/node_modules/vscode-languageclient/lib/common/implementation.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/implementation.js +0 -54
- package/client/node_modules/vscode-languageclient/lib/common/inlayHint.d.ts +0 -20
- package/client/node_modules/vscode-languageclient/lib/common/inlayHint.js +0 -92
- package/client/node_modules/vscode-languageclient/lib/common/inlineCompletion.d.ts +0 -18
- package/client/node_modules/vscode-languageclient/lib/common/inlineCompletion.js +0 -54
- package/client/node_modules/vscode-languageclient/lib/common/inlineValue.d.ts +0 -18
- package/client/node_modules/vscode-languageclient/lib/common/inlineValue.js +0 -65
- package/client/node_modules/vscode-languageclient/lib/common/linkedEditingRange.d.ts +0 -21
- package/client/node_modules/vscode-languageclient/lib/common/linkedEditingRange.js +0 -53
- package/client/node_modules/vscode-languageclient/lib/common/notebook.d.ts +0 -96
- package/client/node_modules/vscode-languageclient/lib/common/notebook.js +0 -851
- package/client/node_modules/vscode-languageclient/lib/common/progress.d.ts +0 -11
- package/client/node_modules/vscode-languageclient/lib/common/progress.js +0 -44
- package/client/node_modules/vscode-languageclient/lib/common/progressPart.d.ts +0 -24
- package/client/node_modules/vscode-languageclient/lib/common/progressPart.js +0 -96
- package/client/node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.d.ts +0 -6
- package/client/node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.js +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/protocolCodeAction.d.ts +0 -6
- package/client/node_modules/vscode-languageclient/lib/common/protocolCodeAction.js +0 -14
- package/client/node_modules/vscode-languageclient/lib/common/protocolCodeLens.d.ts +0 -5
- package/client/node_modules/vscode-languageclient/lib/common/protocolCodeLens.js +0 -13
- package/client/node_modules/vscode-languageclient/lib/common/protocolCompletionItem.d.ts +0 -11
- package/client/node_modules/vscode-languageclient/lib/common/protocolCompletionItem.js +0 -13
- package/client/node_modules/vscode-languageclient/lib/common/protocolConverter.d.ts +0 -167
- package/client/node_modules/vscode-languageclient/lib/common/protocolConverter.js +0 -1134
- package/client/node_modules/vscode-languageclient/lib/common/protocolDiagnostic.d.ts +0 -18
- package/client/node_modules/vscode-languageclient/lib/common/protocolDiagnostic.js +0 -25
- package/client/node_modules/vscode-languageclient/lib/common/protocolDocumentLink.d.ts +0 -5
- package/client/node_modules/vscode-languageclient/lib/common/protocolDocumentLink.js +0 -13
- package/client/node_modules/vscode-languageclient/lib/common/protocolInlayHint.d.ts +0 -5
- package/client/node_modules/vscode-languageclient/lib/common/protocolInlayHint.js +0 -13
- package/client/node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.d.ts +0 -6
- package/client/node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.js +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.d.ts +0 -7
- package/client/node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.js +0 -18
- package/client/node_modules/vscode-languageclient/lib/common/reference.d.ts +0 -20
- package/client/node_modules/vscode-languageclient/lib/common/reference.js +0 -53
- package/client/node_modules/vscode-languageclient/lib/common/rename.d.ts +0 -27
- package/client/node_modules/vscode-languageclient/lib/common/rename.js +0 -113
- package/client/node_modules/vscode-languageclient/lib/common/selectionRange.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/selectionRange.js +0 -57
- package/client/node_modules/vscode-languageclient/lib/common/semanticTokens.d.ts +0 -33
- package/client/node_modules/vscode-languageclient/lib/common/semanticTokens.js +0 -179
- package/client/node_modules/vscode-languageclient/lib/common/signatureHelp.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/signatureHelp.js +0 -71
- package/client/node_modules/vscode-languageclient/lib/common/textSynchronization.d.ts +0 -101
- package/client/node_modules/vscode-languageclient/lib/common/textSynchronization.js +0 -402
- package/client/node_modules/vscode-languageclient/lib/common/typeDefinition.d.ts +0 -16
- package/client/node_modules/vscode-languageclient/lib/common/typeDefinition.js +0 -55
- package/client/node_modules/vscode-languageclient/lib/common/typeHierarchy.d.ts +0 -31
- package/client/node_modules/vscode-languageclient/lib/common/typeHierarchy.js +0 -96
- package/client/node_modules/vscode-languageclient/lib/common/utils/async.d.ts +0 -41
- package/client/node_modules/vscode-languageclient/lib/common/utils/async.js +0 -276
- package/client/node_modules/vscode-languageclient/lib/common/utils/is.d.ts +0 -12
- package/client/node_modules/vscode-languageclient/lib/common/utils/is.js +0 -57
- package/client/node_modules/vscode-languageclient/lib/common/utils/uuid.d.ts +0 -22
- package/client/node_modules/vscode-languageclient/lib/common/utils/uuid.js +0 -97
- package/client/node_modules/vscode-languageclient/lib/common/workspaceFolder.d.ts +0 -30
- package/client/node_modules/vscode-languageclient/lib/common/workspaceFolder.js +0 -148
- package/client/node_modules/vscode-languageclient/lib/common/workspaceSymbol.d.ts +0 -19
- package/client/node_modules/vscode-languageclient/lib/common/workspaceSymbol.js +0 -79
- package/client/node_modules/vscode-languageclient/lib/node/main.d.ts +0 -100
- package/client/node_modules/vscode-languageclient/lib/node/main.js +0 -570
- package/client/node_modules/vscode-languageclient/lib/node/processes.d.ts +0 -6
- package/client/node_modules/vscode-languageclient/lib/node/processes.js +0 -47
- package/client/node_modules/vscode-languageclient/lib/node/terminateProcess.sh +0 -16
- package/client/node_modules/vscode-languageclient/node.cmd +0 -5
- package/client/node_modules/vscode-languageclient/node.d.ts +0 -6
- package/client/node_modules/vscode-languageclient/node.js +0 -7
- package/client/node_modules/vscode-languageclient/package.json +0 -50
- package/client/node_modules/vscode-languageserver-protocol/License.txt +0 -11
- package/client/node_modules/vscode-languageserver-protocol/README.md +0 -16
- package/client/node_modules/vscode-languageserver-protocol/browser.d.ts +0 -6
- package/client/node_modules/vscode-languageserver-protocol/browser.js +0 -7
- package/client/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts +0 -4
- package/client/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -28
- package/client/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts +0 -58
- package/client/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -77
- package/client/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts +0 -187
- package/client/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -15
- package/client/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts +0 -51
- package/client/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -44
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts +0 -1
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js +0 -43
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts +0 -86
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -42
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts +0 -66
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -32
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts +0 -35
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -24
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts +0 -3252
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts +0 -37
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -22
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts +0 -341
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -74
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts +0 -306
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -101
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts +0 -109
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -30
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts +0 -38
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -21
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts +0 -110
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -43
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts +0 -57
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -22
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts +0 -86
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -30
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -943
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts +0 -52
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -19
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts +0 -106
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -68
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts +0 -400
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -214
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts +0 -107
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -37
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts +0 -41
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -20
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts +0 -223
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -57
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts +0 -72
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -22
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts +0 -38
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -21
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts +0 -83
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -42
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts +0 -74
- package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -27
- package/client/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts +0 -9
- package/client/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -46
- package/client/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts +0 -6
- package/client/node_modules/vscode-languageserver-protocol/lib/node/main.js +0 -28
- package/client/node_modules/vscode-languageserver-protocol/metaModel.schema.json +0 -783
- package/client/node_modules/vscode-languageserver-protocol/node.cmd +0 -5
- package/client/node_modules/vscode-languageserver-protocol/node.d.ts +0 -6
- package/client/node_modules/vscode-languageserver-protocol/node.js +0 -7
- package/client/node_modules/vscode-languageserver-protocol/package.json +0 -45
- package/client/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt +0 -31
- package/client/node_modules/vscode-languageserver-types/License.txt +0 -11
- package/client/node_modules/vscode-languageserver-types/README.md +0 -17
- package/client/node_modules/vscode-languageserver-types/lib/esm/main.d.ts +0 -3139
- package/client/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -2222
- package/client/node_modules/vscode-languageserver-types/lib/esm/package.json +0 -3
- package/client/node_modules/vscode-languageserver-types/lib/umd/main.d.ts +0 -3139
- package/client/node_modules/vscode-languageserver-types/lib/umd/main.js +0 -2272
- package/client/node_modules/vscode-languageserver-types/package.json +0 -38
- package/client/node_modules/vscode-languageserver-types/thirdpartynotices.txt +0 -16
- package/client/package-lock.json +0 -125
- package/client/package.json +0 -42
- package/client/src/extension.ts +0 -56
- package/client/tsconfig.json +0 -12
|
@@ -1,3139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A tagging type for string properties that are actually document URIs.
|
|
3
|
-
*/
|
|
4
|
-
export type DocumentUri = string;
|
|
5
|
-
export declare namespace DocumentUri {
|
|
6
|
-
function is(value: any): value is DocumentUri;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* A tagging type for string properties that are actually URIs
|
|
10
|
-
*
|
|
11
|
-
* @since 3.16.0
|
|
12
|
-
*/
|
|
13
|
-
export type URI = string;
|
|
14
|
-
export declare namespace URI {
|
|
15
|
-
function is(value: any): value is URI;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Defines an integer in the range of -2^31 to 2^31 - 1.
|
|
19
|
-
*/
|
|
20
|
-
export type integer = number;
|
|
21
|
-
export declare namespace integer {
|
|
22
|
-
const MIN_VALUE = -2147483648;
|
|
23
|
-
const MAX_VALUE = 2147483647;
|
|
24
|
-
function is(value: any): value is integer;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Defines an unsigned integer in the range of 0 to 2^31 - 1.
|
|
28
|
-
*/
|
|
29
|
-
export type uinteger = number;
|
|
30
|
-
export declare namespace uinteger {
|
|
31
|
-
const MIN_VALUE = 0;
|
|
32
|
-
const MAX_VALUE = 2147483647;
|
|
33
|
-
function is(value: any): value is uinteger;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Defines a decimal number. Since decimal numbers are very
|
|
37
|
-
* rare in the language server specification we denote the
|
|
38
|
-
* exact range with every decimal using the mathematics
|
|
39
|
-
* interval notations (e.g. [0, 1] denotes all decimals d with
|
|
40
|
-
* 0 <= d <= 1.
|
|
41
|
-
*/
|
|
42
|
-
export type decimal = number;
|
|
43
|
-
/**
|
|
44
|
-
* The LSP any type.
|
|
45
|
-
*
|
|
46
|
-
* In the current implementation we map LSPAny to any. This is due to the fact
|
|
47
|
-
* that the TypeScript compilers can't infer string access signatures for
|
|
48
|
-
* interface correctly (it can though for types). See the following issue for
|
|
49
|
-
* details: https://github.com/microsoft/TypeScript/issues/15300.
|
|
50
|
-
*
|
|
51
|
-
* When the issue is addressed LSPAny can be defined as follows:
|
|
52
|
-
*
|
|
53
|
-
* ```ts
|
|
54
|
-
* export type LSPAny = LSPObject | LSPArray | string | integer | uinteger | decimal | boolean | null | undefined;
|
|
55
|
-
* export type LSPObject = { [key: string]: LSPAny };
|
|
56
|
-
* export type LSPArray = LSPAny[];
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* Please note that strictly speaking a property with the value `undefined`
|
|
60
|
-
* can't be converted into JSON preserving the property name. However for
|
|
61
|
-
* convenience it is allowed and assumed that all these properties are
|
|
62
|
-
* optional as well.
|
|
63
|
-
*
|
|
64
|
-
* @since 3.17.0
|
|
65
|
-
*/
|
|
66
|
-
export type LSPAny = any;
|
|
67
|
-
export type LSPObject = object;
|
|
68
|
-
export type LSPArray = any[];
|
|
69
|
-
/**
|
|
70
|
-
* Position in a text document expressed as zero-based line and character
|
|
71
|
-
* offset. Prior to 3.17 the offsets were always based on a UTF-16 string
|
|
72
|
-
* representation. So a string of the form `a𐐀b` the character offset of the
|
|
73
|
-
* character `a` is 0, the character offset of `𐐀` is 1 and the character
|
|
74
|
-
* offset of b is 3 since `𐐀` is represented using two code units in UTF-16.
|
|
75
|
-
* Since 3.17 clients and servers can agree on a different string encoding
|
|
76
|
-
* representation (e.g. UTF-8). The client announces it's supported encoding
|
|
77
|
-
* via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).
|
|
78
|
-
* The value is an array of position encodings the client supports, with
|
|
79
|
-
* decreasing preference (e.g. the encoding at index `0` is the most preferred
|
|
80
|
-
* one). To stay backwards compatible the only mandatory encoding is UTF-16
|
|
81
|
-
* represented via the string `utf-16`. The server can pick one of the
|
|
82
|
-
* encodings offered by the client and signals that encoding back to the
|
|
83
|
-
* client via the initialize result's property
|
|
84
|
-
* [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value
|
|
85
|
-
* `utf-16` is missing from the client's capability `general.positionEncodings`
|
|
86
|
-
* servers can safely assume that the client supports UTF-16. If the server
|
|
87
|
-
* omits the position encoding in its initialize result the encoding defaults
|
|
88
|
-
* to the string value `utf-16`. Implementation considerations: since the
|
|
89
|
-
* conversion from one encoding into another requires the content of the
|
|
90
|
-
* file / line the conversion is best done where the file is read which is
|
|
91
|
-
* usually on the server side.
|
|
92
|
-
*
|
|
93
|
-
* Positions are line end character agnostic. So you can not specify a position
|
|
94
|
-
* that denotes `\r|\n` or `\n|` where `|` represents the character offset.
|
|
95
|
-
*
|
|
96
|
-
* @since 3.17.0 - support for negotiated position encoding.
|
|
97
|
-
*/
|
|
98
|
-
export interface Position {
|
|
99
|
-
/**
|
|
100
|
-
* Line position in a document (zero-based).
|
|
101
|
-
*
|
|
102
|
-
* If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.
|
|
103
|
-
* If a line number is negative, it defaults to 0.
|
|
104
|
-
*/
|
|
105
|
-
line: uinteger;
|
|
106
|
-
/**
|
|
107
|
-
* Character offset on a line in a document (zero-based).
|
|
108
|
-
*
|
|
109
|
-
* The meaning of this offset is determined by the negotiated
|
|
110
|
-
* `PositionEncodingKind`.
|
|
111
|
-
*
|
|
112
|
-
* If the character value is greater than the line length it defaults back to the
|
|
113
|
-
* line length.
|
|
114
|
-
*/
|
|
115
|
-
character: uinteger;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* The Position namespace provides helper functions to work with
|
|
119
|
-
* {@link Position} literals.
|
|
120
|
-
*/
|
|
121
|
-
export declare namespace Position {
|
|
122
|
-
/**
|
|
123
|
-
* Creates a new Position literal from the given line and character.
|
|
124
|
-
* @param line The position's line.
|
|
125
|
-
* @param character The position's character.
|
|
126
|
-
*/
|
|
127
|
-
function create(line: uinteger, character: uinteger): Position;
|
|
128
|
-
/**
|
|
129
|
-
* Checks whether the given literal conforms to the {@link Position} interface.
|
|
130
|
-
*/
|
|
131
|
-
function is(value: any): value is Position;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* A range in a text document expressed as (zero-based) start and end positions.
|
|
135
|
-
*
|
|
136
|
-
* If you want to specify a range that contains a line including the line ending
|
|
137
|
-
* character(s) then use an end position denoting the start of the next line.
|
|
138
|
-
* For example:
|
|
139
|
-
* ```ts
|
|
140
|
-
* {
|
|
141
|
-
* start: { line: 5, character: 23 }
|
|
142
|
-
* end : { line 6, character : 0 }
|
|
143
|
-
* }
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
export interface Range {
|
|
147
|
-
/**
|
|
148
|
-
* The range's start position.
|
|
149
|
-
*/
|
|
150
|
-
start: Position;
|
|
151
|
-
/**
|
|
152
|
-
* The range's end position.
|
|
153
|
-
*/
|
|
154
|
-
end: Position;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* The Range namespace provides helper functions to work with
|
|
158
|
-
* {@link Range} literals.
|
|
159
|
-
*/
|
|
160
|
-
export declare namespace Range {
|
|
161
|
-
/**
|
|
162
|
-
* Create a new Range literal.
|
|
163
|
-
* @param start The range's start position.
|
|
164
|
-
* @param end The range's end position.
|
|
165
|
-
*/
|
|
166
|
-
function create(start: Position, end: Position): Range;
|
|
167
|
-
/**
|
|
168
|
-
* Create a new Range literal.
|
|
169
|
-
* @param startLine The start line number.
|
|
170
|
-
* @param startCharacter The start character.
|
|
171
|
-
* @param endLine The end line number.
|
|
172
|
-
* @param endCharacter The end character.
|
|
173
|
-
*/
|
|
174
|
-
function create(startLine: uinteger, startCharacter: uinteger, endLine: uinteger, endCharacter: uinteger): Range;
|
|
175
|
-
/**
|
|
176
|
-
* Checks whether the given literal conforms to the {@link Range} interface.
|
|
177
|
-
*/
|
|
178
|
-
function is(value: any): value is Range;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Represents a location inside a resource, such as a line
|
|
182
|
-
* inside a text file.
|
|
183
|
-
*/
|
|
184
|
-
export interface Location {
|
|
185
|
-
uri: DocumentUri;
|
|
186
|
-
range: Range;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* The Location namespace provides helper functions to work with
|
|
190
|
-
* {@link Location} literals.
|
|
191
|
-
*/
|
|
192
|
-
export declare namespace Location {
|
|
193
|
-
/**
|
|
194
|
-
* Creates a Location literal.
|
|
195
|
-
* @param uri The location's uri.
|
|
196
|
-
* @param range The location's range.
|
|
197
|
-
*/
|
|
198
|
-
function create(uri: DocumentUri, range: Range): Location;
|
|
199
|
-
/**
|
|
200
|
-
* Checks whether the given literal conforms to the {@link Location} interface.
|
|
201
|
-
*/
|
|
202
|
-
function is(value: any): value is Location;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Represents the connection of two locations. Provides additional metadata over normal {@link Location locations},
|
|
206
|
-
* including an origin range.
|
|
207
|
-
*/
|
|
208
|
-
export interface LocationLink {
|
|
209
|
-
/**
|
|
210
|
-
* Span of the origin of this link.
|
|
211
|
-
*
|
|
212
|
-
* Used as the underlined span for mouse interaction. Defaults to the word range at
|
|
213
|
-
* the definition position.
|
|
214
|
-
*/
|
|
215
|
-
originSelectionRange?: Range;
|
|
216
|
-
/**
|
|
217
|
-
* The target resource identifier of this link.
|
|
218
|
-
*/
|
|
219
|
-
targetUri: DocumentUri;
|
|
220
|
-
/**
|
|
221
|
-
* The full target range of this link. If the target for example is a symbol then target range is the
|
|
222
|
-
* range enclosing this symbol not including leading/trailing whitespace but everything else
|
|
223
|
-
* like comments. This information is typically used to highlight the range in the editor.
|
|
224
|
-
*/
|
|
225
|
-
targetRange: Range;
|
|
226
|
-
/**
|
|
227
|
-
* The range that should be selected and revealed when this link is being followed, e.g the name of a function.
|
|
228
|
-
* Must be contained by the `targetRange`. See also `DocumentSymbol#range`
|
|
229
|
-
*/
|
|
230
|
-
targetSelectionRange: Range;
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* The LocationLink namespace provides helper functions to work with
|
|
234
|
-
* {@link LocationLink} literals.
|
|
235
|
-
*/
|
|
236
|
-
export declare namespace LocationLink {
|
|
237
|
-
/**
|
|
238
|
-
* Creates a LocationLink literal.
|
|
239
|
-
* @param targetUri The definition's uri.
|
|
240
|
-
* @param targetRange The full range of the definition.
|
|
241
|
-
* @param targetSelectionRange The span of the symbol definition at the target.
|
|
242
|
-
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
243
|
-
*/
|
|
244
|
-
function create(targetUri: DocumentUri, targetRange: Range, targetSelectionRange: Range, originSelectionRange?: Range): LocationLink;
|
|
245
|
-
/**
|
|
246
|
-
* Checks whether the given literal conforms to the {@link LocationLink} interface.
|
|
247
|
-
*/
|
|
248
|
-
function is(value: any): value is LocationLink;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Represents a color in RGBA space.
|
|
252
|
-
*/
|
|
253
|
-
export interface Color {
|
|
254
|
-
/**
|
|
255
|
-
* The red component of this color in the range [0-1].
|
|
256
|
-
*/
|
|
257
|
-
readonly red: decimal;
|
|
258
|
-
/**
|
|
259
|
-
* The green component of this color in the range [0-1].
|
|
260
|
-
*/
|
|
261
|
-
readonly green: decimal;
|
|
262
|
-
/**
|
|
263
|
-
* The blue component of this color in the range [0-1].
|
|
264
|
-
*/
|
|
265
|
-
readonly blue: decimal;
|
|
266
|
-
/**
|
|
267
|
-
* The alpha component of this color in the range [0-1].
|
|
268
|
-
*/
|
|
269
|
-
readonly alpha: decimal;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* The Color namespace provides helper functions to work with
|
|
273
|
-
* {@link Color} literals.
|
|
274
|
-
*/
|
|
275
|
-
export declare namespace Color {
|
|
276
|
-
/**
|
|
277
|
-
* Creates a new Color literal.
|
|
278
|
-
*/
|
|
279
|
-
function create(red: decimal, green: decimal, blue: decimal, alpha: decimal): Color;
|
|
280
|
-
/**
|
|
281
|
-
* Checks whether the given literal conforms to the {@link Color} interface.
|
|
282
|
-
*/
|
|
283
|
-
function is(value: any): value is Color;
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Represents a color range from a document.
|
|
287
|
-
*/
|
|
288
|
-
export interface ColorInformation {
|
|
289
|
-
/**
|
|
290
|
-
* The range in the document where this color appears.
|
|
291
|
-
*/
|
|
292
|
-
range: Range;
|
|
293
|
-
/**
|
|
294
|
-
* The actual color value for this color range.
|
|
295
|
-
*/
|
|
296
|
-
color: Color;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* The ColorInformation namespace provides helper functions to work with
|
|
300
|
-
* {@link ColorInformation} literals.
|
|
301
|
-
*/
|
|
302
|
-
export declare namespace ColorInformation {
|
|
303
|
-
/**
|
|
304
|
-
* Creates a new ColorInformation literal.
|
|
305
|
-
*/
|
|
306
|
-
function create(range: Range, color: Color): ColorInformation;
|
|
307
|
-
/**
|
|
308
|
-
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
309
|
-
*/
|
|
310
|
-
function is(value: any): value is ColorInformation;
|
|
311
|
-
}
|
|
312
|
-
export interface ColorPresentation {
|
|
313
|
-
/**
|
|
314
|
-
* The label of this color presentation. It will be shown on the color
|
|
315
|
-
* picker header. By default this is also the text that is inserted when selecting
|
|
316
|
-
* this color presentation.
|
|
317
|
-
*/
|
|
318
|
-
label: string;
|
|
319
|
-
/**
|
|
320
|
-
* An {@link TextEdit edit} which is applied to a document when selecting
|
|
321
|
-
* this presentation for the color. When `falsy` the {@link ColorPresentation.label label}
|
|
322
|
-
* is used.
|
|
323
|
-
*/
|
|
324
|
-
textEdit?: TextEdit;
|
|
325
|
-
/**
|
|
326
|
-
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
327
|
-
* selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves.
|
|
328
|
-
*/
|
|
329
|
-
additionalTextEdits?: TextEdit[];
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* The Color namespace provides helper functions to work with
|
|
333
|
-
* {@link ColorPresentation} literals.
|
|
334
|
-
*/
|
|
335
|
-
export declare namespace ColorPresentation {
|
|
336
|
-
/**
|
|
337
|
-
* Creates a new ColorInformation literal.
|
|
338
|
-
*/
|
|
339
|
-
function create(label: string, textEdit?: TextEdit, additionalTextEdits?: TextEdit[]): ColorPresentation;
|
|
340
|
-
/**
|
|
341
|
-
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
342
|
-
*/
|
|
343
|
-
function is(value: any): value is ColorPresentation;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* A set of predefined range kinds.
|
|
347
|
-
*/
|
|
348
|
-
export declare namespace FoldingRangeKind {
|
|
349
|
-
/**
|
|
350
|
-
* Folding range for a comment
|
|
351
|
-
*/
|
|
352
|
-
const Comment = "comment";
|
|
353
|
-
/**
|
|
354
|
-
* Folding range for an import or include
|
|
355
|
-
*/
|
|
356
|
-
const Imports = "imports";
|
|
357
|
-
/**
|
|
358
|
-
* Folding range for a region (e.g. `#region`)
|
|
359
|
-
*/
|
|
360
|
-
const Region = "region";
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* A predefined folding range kind.
|
|
364
|
-
*
|
|
365
|
-
* The type is a string since the value set is extensible
|
|
366
|
-
*/
|
|
367
|
-
export type FoldingRangeKind = string;
|
|
368
|
-
/**
|
|
369
|
-
* Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
|
|
370
|
-
* than the number of lines in the document. Clients are free to ignore invalid ranges.
|
|
371
|
-
*/
|
|
372
|
-
export interface FoldingRange {
|
|
373
|
-
/**
|
|
374
|
-
* The zero-based start line of the range to fold. The folded area starts after the line's last character.
|
|
375
|
-
* To be valid, the end must be zero or larger and smaller than the number of lines in the document.
|
|
376
|
-
*/
|
|
377
|
-
startLine: uinteger;
|
|
378
|
-
/**
|
|
379
|
-
* The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
|
|
380
|
-
*/
|
|
381
|
-
startCharacter?: uinteger;
|
|
382
|
-
/**
|
|
383
|
-
* The zero-based end line of the range to fold. The folded area ends with the line's last character.
|
|
384
|
-
* To be valid, the end must be zero or larger and smaller than the number of lines in the document.
|
|
385
|
-
*/
|
|
386
|
-
endLine: uinteger;
|
|
387
|
-
/**
|
|
388
|
-
* The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
|
|
389
|
-
*/
|
|
390
|
-
endCharacter?: uinteger;
|
|
391
|
-
/**
|
|
392
|
-
* Describes the kind of the folding range such as `comment' or 'region'. The kind
|
|
393
|
-
* is used to categorize folding ranges and used by commands like 'Fold all comments'.
|
|
394
|
-
* See {@link FoldingRangeKind} for an enumeration of standardized kinds.
|
|
395
|
-
*/
|
|
396
|
-
kind?: FoldingRangeKind;
|
|
397
|
-
/**
|
|
398
|
-
* The text that the client should show when the specified range is
|
|
399
|
-
* collapsed. If not defined or not supported by the client, a default
|
|
400
|
-
* will be chosen by the client.
|
|
401
|
-
*
|
|
402
|
-
* @since 3.17.0
|
|
403
|
-
*/
|
|
404
|
-
collapsedText?: string;
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* The folding range namespace provides helper functions to work with
|
|
408
|
-
* {@link FoldingRange} literals.
|
|
409
|
-
*/
|
|
410
|
-
export declare namespace FoldingRange {
|
|
411
|
-
/**
|
|
412
|
-
* Creates a new FoldingRange literal.
|
|
413
|
-
*/
|
|
414
|
-
function create(startLine: uinteger, endLine: uinteger, startCharacter?: uinteger, endCharacter?: uinteger, kind?: FoldingRangeKind, collapsedText?: string): FoldingRange;
|
|
415
|
-
/**
|
|
416
|
-
* Checks whether the given literal conforms to the {@link FoldingRange} interface.
|
|
417
|
-
*/
|
|
418
|
-
function is(value: any): value is FoldingRange;
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Represents a related message and source code location for a diagnostic. This should be
|
|
422
|
-
* used to point to code locations that cause or related to a diagnostics, e.g when duplicating
|
|
423
|
-
* a symbol in a scope.
|
|
424
|
-
*/
|
|
425
|
-
export interface DiagnosticRelatedInformation {
|
|
426
|
-
/**
|
|
427
|
-
* The location of this related diagnostic information.
|
|
428
|
-
*/
|
|
429
|
-
location: Location;
|
|
430
|
-
/**
|
|
431
|
-
* The message of this related diagnostic information.
|
|
432
|
-
*/
|
|
433
|
-
message: string;
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* The DiagnosticRelatedInformation namespace provides helper functions to work with
|
|
437
|
-
* {@link DiagnosticRelatedInformation} literals.
|
|
438
|
-
*/
|
|
439
|
-
export declare namespace DiagnosticRelatedInformation {
|
|
440
|
-
/**
|
|
441
|
-
* Creates a new DiagnosticRelatedInformation literal.
|
|
442
|
-
*/
|
|
443
|
-
function create(location: Location, message: string): DiagnosticRelatedInformation;
|
|
444
|
-
/**
|
|
445
|
-
* Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
|
|
446
|
-
*/
|
|
447
|
-
function is(value: any): value is DiagnosticRelatedInformation;
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* The diagnostic's severity.
|
|
451
|
-
*/
|
|
452
|
-
export declare namespace DiagnosticSeverity {
|
|
453
|
-
/**
|
|
454
|
-
* Reports an error.
|
|
455
|
-
*/
|
|
456
|
-
const Error: 1;
|
|
457
|
-
/**
|
|
458
|
-
* Reports a warning.
|
|
459
|
-
*/
|
|
460
|
-
const Warning: 2;
|
|
461
|
-
/**
|
|
462
|
-
* Reports an information.
|
|
463
|
-
*/
|
|
464
|
-
const Information: 3;
|
|
465
|
-
/**
|
|
466
|
-
* Reports a hint.
|
|
467
|
-
*/
|
|
468
|
-
const Hint: 4;
|
|
469
|
-
}
|
|
470
|
-
export type DiagnosticSeverity = 1 | 2 | 3 | 4;
|
|
471
|
-
/**
|
|
472
|
-
* The diagnostic tags.
|
|
473
|
-
*
|
|
474
|
-
* @since 3.15.0
|
|
475
|
-
*/
|
|
476
|
-
export declare namespace DiagnosticTag {
|
|
477
|
-
/**
|
|
478
|
-
* Unused or unnecessary code.
|
|
479
|
-
*
|
|
480
|
-
* Clients are allowed to render diagnostics with this tag faded out instead of having
|
|
481
|
-
* an error squiggle.
|
|
482
|
-
*/
|
|
483
|
-
const Unnecessary: 1;
|
|
484
|
-
/**
|
|
485
|
-
* Deprecated or obsolete code.
|
|
486
|
-
*
|
|
487
|
-
* Clients are allowed to rendered diagnostics with this tag strike through.
|
|
488
|
-
*/
|
|
489
|
-
const Deprecated: 2;
|
|
490
|
-
}
|
|
491
|
-
export type DiagnosticTag = 1 | 2;
|
|
492
|
-
/**
|
|
493
|
-
* Structure to capture a description for an error code.
|
|
494
|
-
*
|
|
495
|
-
* @since 3.16.0
|
|
496
|
-
*/
|
|
497
|
-
export interface CodeDescription {
|
|
498
|
-
/**
|
|
499
|
-
* An URI to open with more information about the diagnostic error.
|
|
500
|
-
*/
|
|
501
|
-
href: URI;
|
|
502
|
-
}
|
|
503
|
-
/**
|
|
504
|
-
* The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
|
|
505
|
-
*
|
|
506
|
-
* @since 3.16.0
|
|
507
|
-
*/
|
|
508
|
-
export declare namespace CodeDescription {
|
|
509
|
-
function is(value: any): value is CodeDescription;
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
|
|
513
|
-
* are only valid in the scope of a resource.
|
|
514
|
-
*/
|
|
515
|
-
export interface Diagnostic {
|
|
516
|
-
/**
|
|
517
|
-
* The range at which the message applies
|
|
518
|
-
*/
|
|
519
|
-
range: Range;
|
|
520
|
-
/**
|
|
521
|
-
* The diagnostic's severity. Can be omitted. If omitted it is up to the
|
|
522
|
-
* client to interpret diagnostics as error, warning, info or hint.
|
|
523
|
-
*/
|
|
524
|
-
severity?: DiagnosticSeverity;
|
|
525
|
-
/**
|
|
526
|
-
* The diagnostic's code, which usually appear in the user interface.
|
|
527
|
-
*/
|
|
528
|
-
code?: integer | string;
|
|
529
|
-
/**
|
|
530
|
-
* An optional property to describe the error code.
|
|
531
|
-
* Requires the code field (above) to be present/not null.
|
|
532
|
-
*
|
|
533
|
-
* @since 3.16.0
|
|
534
|
-
*/
|
|
535
|
-
codeDescription?: CodeDescription;
|
|
536
|
-
/**
|
|
537
|
-
* A human-readable string describing the source of this
|
|
538
|
-
* diagnostic, e.g. 'typescript' or 'super lint'. It usually
|
|
539
|
-
* appears in the user interface.
|
|
540
|
-
*/
|
|
541
|
-
source?: string;
|
|
542
|
-
/**
|
|
543
|
-
* The diagnostic's message. It usually appears in the user interface
|
|
544
|
-
*/
|
|
545
|
-
message: string;
|
|
546
|
-
/**
|
|
547
|
-
* Additional metadata about the diagnostic.
|
|
548
|
-
*
|
|
549
|
-
* @since 3.15.0
|
|
550
|
-
*/
|
|
551
|
-
tags?: DiagnosticTag[];
|
|
552
|
-
/**
|
|
553
|
-
* An array of related diagnostic information, e.g. when symbol-names within
|
|
554
|
-
* a scope collide all definitions can be marked via this property.
|
|
555
|
-
*/
|
|
556
|
-
relatedInformation?: DiagnosticRelatedInformation[];
|
|
557
|
-
/**
|
|
558
|
-
* A data entry field that is preserved between a `textDocument/publishDiagnostics`
|
|
559
|
-
* notification and `textDocument/codeAction` request.
|
|
560
|
-
*
|
|
561
|
-
* @since 3.16.0
|
|
562
|
-
*/
|
|
563
|
-
data?: LSPAny;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* The Diagnostic namespace provides helper functions to work with
|
|
567
|
-
* {@link Diagnostic} literals.
|
|
568
|
-
*/
|
|
569
|
-
export declare namespace Diagnostic {
|
|
570
|
-
/**
|
|
571
|
-
* Creates a new Diagnostic literal.
|
|
572
|
-
*/
|
|
573
|
-
function create(range: Range, message: string, severity?: DiagnosticSeverity, code?: integer | string, source?: string, relatedInformation?: DiagnosticRelatedInformation[]): Diagnostic;
|
|
574
|
-
/**
|
|
575
|
-
* Checks whether the given literal conforms to the {@link Diagnostic} interface.
|
|
576
|
-
*/
|
|
577
|
-
function is(value: any): value is Diagnostic;
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* Represents a reference to a command. Provides a title which
|
|
581
|
-
* will be used to represent a command in the UI and, optionally,
|
|
582
|
-
* an array of arguments which will be passed to the command handler
|
|
583
|
-
* function when invoked.
|
|
584
|
-
*/
|
|
585
|
-
export interface Command {
|
|
586
|
-
/**
|
|
587
|
-
* Title of the command, like `save`.
|
|
588
|
-
*/
|
|
589
|
-
title: string;
|
|
590
|
-
/**
|
|
591
|
-
* The identifier of the actual command handler.
|
|
592
|
-
*/
|
|
593
|
-
command: string;
|
|
594
|
-
/**
|
|
595
|
-
* Arguments that the command handler should be
|
|
596
|
-
* invoked with.
|
|
597
|
-
*/
|
|
598
|
-
arguments?: LSPAny[];
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* The Command namespace provides helper functions to work with
|
|
602
|
-
* {@link Command} literals.
|
|
603
|
-
*/
|
|
604
|
-
export declare namespace Command {
|
|
605
|
-
/**
|
|
606
|
-
* Creates a new Command literal.
|
|
607
|
-
*/
|
|
608
|
-
function create(title: string, command: string, ...args: any[]): Command;
|
|
609
|
-
/**
|
|
610
|
-
* Checks whether the given literal conforms to the {@link Command} interface.
|
|
611
|
-
*/
|
|
612
|
-
function is(value: any): value is Command;
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* A text edit applicable to a text document.
|
|
616
|
-
*/
|
|
617
|
-
export interface TextEdit {
|
|
618
|
-
/**
|
|
619
|
-
* The range of the text document to be manipulated. To insert
|
|
620
|
-
* text into a document create a range where start === end.
|
|
621
|
-
*/
|
|
622
|
-
range: Range;
|
|
623
|
-
/**
|
|
624
|
-
* The string to be inserted. For delete operations use an
|
|
625
|
-
* empty string.
|
|
626
|
-
*/
|
|
627
|
-
newText: string;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* The TextEdit namespace provides helper function to create replace,
|
|
631
|
-
* insert and delete edits more easily.
|
|
632
|
-
*/
|
|
633
|
-
export declare namespace TextEdit {
|
|
634
|
-
/**
|
|
635
|
-
* Creates a replace text edit.
|
|
636
|
-
* @param range The range of text to be replaced.
|
|
637
|
-
* @param newText The new text.
|
|
638
|
-
*/
|
|
639
|
-
function replace(range: Range, newText: string): TextEdit;
|
|
640
|
-
/**
|
|
641
|
-
* Creates an insert text edit.
|
|
642
|
-
* @param position The position to insert the text at.
|
|
643
|
-
* @param newText The text to be inserted.
|
|
644
|
-
*/
|
|
645
|
-
function insert(position: Position, newText: string): TextEdit;
|
|
646
|
-
/**
|
|
647
|
-
* Creates a delete text edit.
|
|
648
|
-
* @param range The range of text to be deleted.
|
|
649
|
-
*/
|
|
650
|
-
function del(range: Range): TextEdit;
|
|
651
|
-
function is(value: any): value is TextEdit;
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Additional information that describes document changes.
|
|
655
|
-
*
|
|
656
|
-
* @since 3.16.0
|
|
657
|
-
*/
|
|
658
|
-
export interface ChangeAnnotation {
|
|
659
|
-
/**
|
|
660
|
-
* A human-readable string describing the actual change. The string
|
|
661
|
-
* is rendered prominent in the user interface.
|
|
662
|
-
*/
|
|
663
|
-
label: string;
|
|
664
|
-
/**
|
|
665
|
-
* A flag which indicates that user confirmation is needed
|
|
666
|
-
* before applying the change.
|
|
667
|
-
*/
|
|
668
|
-
needsConfirmation?: boolean;
|
|
669
|
-
/**
|
|
670
|
-
* A human-readable string which is rendered less prominent in
|
|
671
|
-
* the user interface.
|
|
672
|
-
*/
|
|
673
|
-
description?: string;
|
|
674
|
-
}
|
|
675
|
-
export declare namespace ChangeAnnotation {
|
|
676
|
-
function create(label: string, needsConfirmation?: boolean, description?: string): ChangeAnnotation;
|
|
677
|
-
function is(value: any): value is ChangeAnnotation;
|
|
678
|
-
}
|
|
679
|
-
export declare namespace ChangeAnnotationIdentifier {
|
|
680
|
-
function is(value: any): value is ChangeAnnotationIdentifier;
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* An identifier to refer to a change annotation stored with a workspace edit.
|
|
684
|
-
*/
|
|
685
|
-
export type ChangeAnnotationIdentifier = string;
|
|
686
|
-
/**
|
|
687
|
-
* A special text edit with an additional change annotation.
|
|
688
|
-
*
|
|
689
|
-
* @since 3.16.0.
|
|
690
|
-
*/
|
|
691
|
-
export interface AnnotatedTextEdit extends TextEdit {
|
|
692
|
-
/**
|
|
693
|
-
* The actual identifier of the change annotation
|
|
694
|
-
*/
|
|
695
|
-
annotationId: ChangeAnnotationIdentifier;
|
|
696
|
-
}
|
|
697
|
-
export declare namespace AnnotatedTextEdit {
|
|
698
|
-
/**
|
|
699
|
-
* Creates an annotated replace text edit.
|
|
700
|
-
*
|
|
701
|
-
* @param range The range of text to be replaced.
|
|
702
|
-
* @param newText The new text.
|
|
703
|
-
* @param annotation The annotation.
|
|
704
|
-
*/
|
|
705
|
-
function replace(range: Range, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit;
|
|
706
|
-
/**
|
|
707
|
-
* Creates an annotated insert text edit.
|
|
708
|
-
*
|
|
709
|
-
* @param position The position to insert the text at.
|
|
710
|
-
* @param newText The text to be inserted.
|
|
711
|
-
* @param annotation The annotation.
|
|
712
|
-
*/
|
|
713
|
-
function insert(position: Position, newText: string, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit;
|
|
714
|
-
/**
|
|
715
|
-
* Creates an annotated delete text edit.
|
|
716
|
-
*
|
|
717
|
-
* @param range The range of text to be deleted.
|
|
718
|
-
* @param annotation The annotation.
|
|
719
|
-
*/
|
|
720
|
-
function del(range: Range, annotation: ChangeAnnotationIdentifier): AnnotatedTextEdit;
|
|
721
|
-
function is(value: any): value is AnnotatedTextEdit;
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* Describes textual changes on a text document. A TextDocumentEdit describes all changes
|
|
725
|
-
* on a document version Si and after they are applied move the document to version Si+1.
|
|
726
|
-
* So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
|
|
727
|
-
* kind of ordering. However the edits must be non overlapping.
|
|
728
|
-
*/
|
|
729
|
-
export interface TextDocumentEdit {
|
|
730
|
-
/**
|
|
731
|
-
* The text document to change.
|
|
732
|
-
*/
|
|
733
|
-
textDocument: OptionalVersionedTextDocumentIdentifier;
|
|
734
|
-
/**
|
|
735
|
-
* The edits to be applied.
|
|
736
|
-
*
|
|
737
|
-
* @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a
|
|
738
|
-
* client capability.
|
|
739
|
-
*/
|
|
740
|
-
edits: (TextEdit | AnnotatedTextEdit)[];
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* The TextDocumentEdit namespace provides helper function to create
|
|
744
|
-
* an edit that manipulates a text document.
|
|
745
|
-
*/
|
|
746
|
-
export declare namespace TextDocumentEdit {
|
|
747
|
-
/**
|
|
748
|
-
* Creates a new `TextDocumentEdit`
|
|
749
|
-
*/
|
|
750
|
-
function create(textDocument: OptionalVersionedTextDocumentIdentifier, edits: (TextEdit | AnnotatedTextEdit)[]): TextDocumentEdit;
|
|
751
|
-
function is(value: any): value is TextDocumentEdit;
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* A generic resource operation.
|
|
755
|
-
*/
|
|
756
|
-
interface ResourceOperation {
|
|
757
|
-
/**
|
|
758
|
-
* The resource operation kind.
|
|
759
|
-
*/
|
|
760
|
-
kind: string;
|
|
761
|
-
/**
|
|
762
|
-
* An optional annotation identifier describing the operation.
|
|
763
|
-
*
|
|
764
|
-
* @since 3.16.0
|
|
765
|
-
*/
|
|
766
|
-
annotationId?: ChangeAnnotationIdentifier;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Options to create a file.
|
|
770
|
-
*/
|
|
771
|
-
export interface CreateFileOptions {
|
|
772
|
-
/**
|
|
773
|
-
* Overwrite existing file. Overwrite wins over `ignoreIfExists`
|
|
774
|
-
*/
|
|
775
|
-
overwrite?: boolean;
|
|
776
|
-
/**
|
|
777
|
-
* Ignore if exists.
|
|
778
|
-
*/
|
|
779
|
-
ignoreIfExists?: boolean;
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Create file operation.
|
|
783
|
-
*/
|
|
784
|
-
export interface CreateFile extends ResourceOperation {
|
|
785
|
-
/**
|
|
786
|
-
* A create
|
|
787
|
-
*/
|
|
788
|
-
kind: 'create';
|
|
789
|
-
/**
|
|
790
|
-
* The resource to create.
|
|
791
|
-
*/
|
|
792
|
-
uri: DocumentUri;
|
|
793
|
-
/**
|
|
794
|
-
* Additional options
|
|
795
|
-
*/
|
|
796
|
-
options?: CreateFileOptions;
|
|
797
|
-
}
|
|
798
|
-
export declare namespace CreateFile {
|
|
799
|
-
function create(uri: DocumentUri, options?: CreateFileOptions, annotation?: ChangeAnnotationIdentifier): CreateFile;
|
|
800
|
-
function is(value: any): value is CreateFile;
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* Rename file options
|
|
804
|
-
*/
|
|
805
|
-
export interface RenameFileOptions {
|
|
806
|
-
/**
|
|
807
|
-
* Overwrite target if existing. Overwrite wins over `ignoreIfExists`
|
|
808
|
-
*/
|
|
809
|
-
overwrite?: boolean;
|
|
810
|
-
/**
|
|
811
|
-
* Ignores if target exists.
|
|
812
|
-
*/
|
|
813
|
-
ignoreIfExists?: boolean;
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* Rename file operation
|
|
817
|
-
*/
|
|
818
|
-
export interface RenameFile extends ResourceOperation {
|
|
819
|
-
/**
|
|
820
|
-
* A rename
|
|
821
|
-
*/
|
|
822
|
-
kind: 'rename';
|
|
823
|
-
/**
|
|
824
|
-
* The old (existing) location.
|
|
825
|
-
*/
|
|
826
|
-
oldUri: DocumentUri;
|
|
827
|
-
/**
|
|
828
|
-
* The new location.
|
|
829
|
-
*/
|
|
830
|
-
newUri: DocumentUri;
|
|
831
|
-
/**
|
|
832
|
-
* Rename options.
|
|
833
|
-
*/
|
|
834
|
-
options?: RenameFileOptions;
|
|
835
|
-
}
|
|
836
|
-
export declare namespace RenameFile {
|
|
837
|
-
function create(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions, annotation?: ChangeAnnotationIdentifier): RenameFile;
|
|
838
|
-
function is(value: any): value is RenameFile;
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* Delete file options
|
|
842
|
-
*/
|
|
843
|
-
export interface DeleteFileOptions {
|
|
844
|
-
/**
|
|
845
|
-
* Delete the content recursively if a folder is denoted.
|
|
846
|
-
*/
|
|
847
|
-
recursive?: boolean;
|
|
848
|
-
/**
|
|
849
|
-
* Ignore the operation if the file doesn't exist.
|
|
850
|
-
*/
|
|
851
|
-
ignoreIfNotExists?: boolean;
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
* Delete file operation
|
|
855
|
-
*/
|
|
856
|
-
export interface DeleteFile extends ResourceOperation {
|
|
857
|
-
/**
|
|
858
|
-
* A delete
|
|
859
|
-
*/
|
|
860
|
-
kind: 'delete';
|
|
861
|
-
/**
|
|
862
|
-
* The file to delete.
|
|
863
|
-
*/
|
|
864
|
-
uri: DocumentUri;
|
|
865
|
-
/**
|
|
866
|
-
* Delete options.
|
|
867
|
-
*/
|
|
868
|
-
options?: DeleteFileOptions;
|
|
869
|
-
}
|
|
870
|
-
export declare namespace DeleteFile {
|
|
871
|
-
function create(uri: DocumentUri, options?: DeleteFileOptions, annotation?: ChangeAnnotationIdentifier): DeleteFile;
|
|
872
|
-
function is(value: any): value is DeleteFile;
|
|
873
|
-
}
|
|
874
|
-
/**
|
|
875
|
-
* A workspace edit represents changes to many resources managed in the workspace. The edit
|
|
876
|
-
* should either provide `changes` or `documentChanges`. If documentChanges are present
|
|
877
|
-
* they are preferred over `changes` if the client can handle versioned document edits.
|
|
878
|
-
*
|
|
879
|
-
* Since version 3.13.0 a workspace edit can contain resource operations as well. If resource
|
|
880
|
-
* operations are present clients need to execute the operations in the order in which they
|
|
881
|
-
* are provided. So a workspace edit for example can consist of the following two changes:
|
|
882
|
-
* (1) a create file a.txt and (2) a text document edit which insert text into file a.txt.
|
|
883
|
-
*
|
|
884
|
-
* An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will
|
|
885
|
-
* cause failure of the operation. How the client recovers from the failure is described by
|
|
886
|
-
* the client capability: `workspace.workspaceEdit.failureHandling`
|
|
887
|
-
*/
|
|
888
|
-
export interface WorkspaceEdit {
|
|
889
|
-
/**
|
|
890
|
-
* Holds changes to existing resources.
|
|
891
|
-
*/
|
|
892
|
-
changes?: {
|
|
893
|
-
[uri: DocumentUri]: TextEdit[];
|
|
894
|
-
};
|
|
895
|
-
/**
|
|
896
|
-
* Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
|
|
897
|
-
* are either an array of `TextDocumentEdit`s to express changes to n different text documents
|
|
898
|
-
* where each text document edit addresses a specific version of a text document. Or it can contain
|
|
899
|
-
* above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
|
|
900
|
-
*
|
|
901
|
-
* Whether a client supports versioned document edits is expressed via
|
|
902
|
-
* `workspace.workspaceEdit.documentChanges` client capability.
|
|
903
|
-
*
|
|
904
|
-
* If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
|
|
905
|
-
* only plain `TextEdit`s using the `changes` property are supported.
|
|
906
|
-
*/
|
|
907
|
-
documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
|
|
908
|
-
/**
|
|
909
|
-
* A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and
|
|
910
|
-
* delete file / folder operations.
|
|
911
|
-
*
|
|
912
|
-
* Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.
|
|
913
|
-
*
|
|
914
|
-
* @since 3.16.0
|
|
915
|
-
*/
|
|
916
|
-
changeAnnotations?: {
|
|
917
|
-
[id: ChangeAnnotationIdentifier]: ChangeAnnotation;
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
export declare namespace WorkspaceEdit {
|
|
921
|
-
function is(value: any): value is WorkspaceEdit;
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* A change to capture text edits for existing resources.
|
|
925
|
-
*/
|
|
926
|
-
export interface TextEditChange {
|
|
927
|
-
/**
|
|
928
|
-
* Gets all text edits for this change.
|
|
929
|
-
*
|
|
930
|
-
* @return An array of text edits.
|
|
931
|
-
*
|
|
932
|
-
* @since 3.16.0 - support for annotated text edits. This is usually
|
|
933
|
-
* guarded using a client capability.
|
|
934
|
-
*/
|
|
935
|
-
all(): (TextEdit | AnnotatedTextEdit)[];
|
|
936
|
-
/**
|
|
937
|
-
* Clears the edits for this change.
|
|
938
|
-
*/
|
|
939
|
-
clear(): void;
|
|
940
|
-
/**
|
|
941
|
-
* Adds a text edit.
|
|
942
|
-
*
|
|
943
|
-
* @param edit the text edit to add.
|
|
944
|
-
*
|
|
945
|
-
* @since 3.16.0 - support for annotated text edits. This is usually
|
|
946
|
-
* guarded using a client capability.
|
|
947
|
-
*/
|
|
948
|
-
add(edit: TextEdit | AnnotatedTextEdit): void;
|
|
949
|
-
/**
|
|
950
|
-
* Insert the given text at the given position.
|
|
951
|
-
*
|
|
952
|
-
* @param position A position.
|
|
953
|
-
* @param newText A string.
|
|
954
|
-
* @param annotation An optional annotation.
|
|
955
|
-
*/
|
|
956
|
-
insert(position: Position, newText: string): void;
|
|
957
|
-
insert(position: Position, newText: string, annotation: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier;
|
|
958
|
-
/**
|
|
959
|
-
* Replace the given range with given text for the given resource.
|
|
960
|
-
*
|
|
961
|
-
* @param range A range.
|
|
962
|
-
* @param newText A string.
|
|
963
|
-
* @param annotation An optional annotation.
|
|
964
|
-
*/
|
|
965
|
-
replace(range: Range, newText: string): void;
|
|
966
|
-
replace(range: Range, newText: string, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier;
|
|
967
|
-
/**
|
|
968
|
-
* Delete the text at the given range.
|
|
969
|
-
*
|
|
970
|
-
* @param range A range.
|
|
971
|
-
* @param annotation An optional annotation.
|
|
972
|
-
*/
|
|
973
|
-
delete(range: Range): void;
|
|
974
|
-
delete(range: Range, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier): ChangeAnnotationIdentifier;
|
|
975
|
-
}
|
|
976
|
-
/**
|
|
977
|
-
* A workspace change helps constructing changes to a workspace.
|
|
978
|
-
*/
|
|
979
|
-
export declare class WorkspaceChange {
|
|
980
|
-
private _workspaceEdit;
|
|
981
|
-
private _textEditChanges;
|
|
982
|
-
private _changeAnnotations;
|
|
983
|
-
constructor(workspaceEdit?: WorkspaceEdit);
|
|
984
|
-
/**
|
|
985
|
-
* Returns the underlying {@link WorkspaceEdit} literal
|
|
986
|
-
* use to be returned from a workspace edit operation like rename.
|
|
987
|
-
*/
|
|
988
|
-
get edit(): WorkspaceEdit;
|
|
989
|
-
/**
|
|
990
|
-
* Returns the {@link TextEditChange} to manage text edits
|
|
991
|
-
* for resources.
|
|
992
|
-
*/
|
|
993
|
-
getTextEditChange(textDocument: OptionalVersionedTextDocumentIdentifier): TextEditChange;
|
|
994
|
-
getTextEditChange(uri: DocumentUri): TextEditChange;
|
|
995
|
-
private initDocumentChanges;
|
|
996
|
-
private initChanges;
|
|
997
|
-
createFile(uri: DocumentUri, options?: CreateFileOptions): void;
|
|
998
|
-
createFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: CreateFileOptions): ChangeAnnotationIdentifier;
|
|
999
|
-
renameFile(oldUri: DocumentUri, newUri: DocumentUri, options?: RenameFileOptions): void;
|
|
1000
|
-
renameFile(oldUri: DocumentUri, newUri: DocumentUri, annotation?: ChangeAnnotation | ChangeAnnotationIdentifier, options?: RenameFileOptions): ChangeAnnotationIdentifier;
|
|
1001
|
-
deleteFile(uri: DocumentUri, options?: DeleteFileOptions): void;
|
|
1002
|
-
deleteFile(uri: DocumentUri, annotation: ChangeAnnotation | ChangeAnnotationIdentifier, options?: DeleteFileOptions): ChangeAnnotationIdentifier;
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* A literal to identify a text document in the client.
|
|
1006
|
-
*/
|
|
1007
|
-
export interface TextDocumentIdentifier {
|
|
1008
|
-
/**
|
|
1009
|
-
* The text document's uri.
|
|
1010
|
-
*/
|
|
1011
|
-
uri: DocumentUri;
|
|
1012
|
-
}
|
|
1013
|
-
/**
|
|
1014
|
-
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
1015
|
-
* {@link TextDocumentIdentifier} literals.
|
|
1016
|
-
*/
|
|
1017
|
-
export declare namespace TextDocumentIdentifier {
|
|
1018
|
-
/**
|
|
1019
|
-
* Creates a new TextDocumentIdentifier literal.
|
|
1020
|
-
* @param uri The document's uri.
|
|
1021
|
-
*/
|
|
1022
|
-
function create(uri: DocumentUri): TextDocumentIdentifier;
|
|
1023
|
-
/**
|
|
1024
|
-
* Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
|
|
1025
|
-
*/
|
|
1026
|
-
function is(value: any): value is TextDocumentIdentifier;
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* A text document identifier to denote a specific version of a text document.
|
|
1030
|
-
*/
|
|
1031
|
-
export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier {
|
|
1032
|
-
/**
|
|
1033
|
-
* The version number of this document.
|
|
1034
|
-
*/
|
|
1035
|
-
version: integer;
|
|
1036
|
-
}
|
|
1037
|
-
/**
|
|
1038
|
-
* The VersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
1039
|
-
* {@link VersionedTextDocumentIdentifier} literals.
|
|
1040
|
-
*/
|
|
1041
|
-
export declare namespace VersionedTextDocumentIdentifier {
|
|
1042
|
-
/**
|
|
1043
|
-
* Creates a new VersionedTextDocumentIdentifier literal.
|
|
1044
|
-
* @param uri The document's uri.
|
|
1045
|
-
* @param version The document's version.
|
|
1046
|
-
*/
|
|
1047
|
-
function create(uri: DocumentUri, version: integer): VersionedTextDocumentIdentifier;
|
|
1048
|
-
/**
|
|
1049
|
-
* Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
|
|
1050
|
-
*/
|
|
1051
|
-
function is(value: any): value is VersionedTextDocumentIdentifier;
|
|
1052
|
-
}
|
|
1053
|
-
/**
|
|
1054
|
-
* A text document identifier to optionally denote a specific version of a text document.
|
|
1055
|
-
*/
|
|
1056
|
-
export interface OptionalVersionedTextDocumentIdentifier extends TextDocumentIdentifier {
|
|
1057
|
-
/**
|
|
1058
|
-
* The version number of this document. If a versioned text document identifier
|
|
1059
|
-
* is sent from the server to the client and the file is not open in the editor
|
|
1060
|
-
* (the server has not received an open notification before) the server can send
|
|
1061
|
-
* `null` to indicate that the version is unknown and the content on disk is the
|
|
1062
|
-
* truth (as specified with document content ownership).
|
|
1063
|
-
*/
|
|
1064
|
-
version: integer | null;
|
|
1065
|
-
}
|
|
1066
|
-
/**
|
|
1067
|
-
* The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
1068
|
-
* {@link OptionalVersionedTextDocumentIdentifier} literals.
|
|
1069
|
-
*/
|
|
1070
|
-
export declare namespace OptionalVersionedTextDocumentIdentifier {
|
|
1071
|
-
/**
|
|
1072
|
-
* Creates a new OptionalVersionedTextDocumentIdentifier literal.
|
|
1073
|
-
* @param uri The document's uri.
|
|
1074
|
-
* @param version The document's version.
|
|
1075
|
-
*/
|
|
1076
|
-
function create(uri: DocumentUri, version: integer | null): OptionalVersionedTextDocumentIdentifier;
|
|
1077
|
-
/**
|
|
1078
|
-
* Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
|
|
1079
|
-
*/
|
|
1080
|
-
function is(value: any): value is OptionalVersionedTextDocumentIdentifier;
|
|
1081
|
-
}
|
|
1082
|
-
/**
|
|
1083
|
-
* An item to transfer a text document from the client to the
|
|
1084
|
-
* server.
|
|
1085
|
-
*/
|
|
1086
|
-
export interface TextDocumentItem {
|
|
1087
|
-
/**
|
|
1088
|
-
* The text document's uri.
|
|
1089
|
-
*/
|
|
1090
|
-
uri: DocumentUri;
|
|
1091
|
-
/**
|
|
1092
|
-
* The text document's language identifier.
|
|
1093
|
-
*/
|
|
1094
|
-
languageId: string;
|
|
1095
|
-
/**
|
|
1096
|
-
* The version number of this document (it will increase after each
|
|
1097
|
-
* change, including undo/redo).
|
|
1098
|
-
*/
|
|
1099
|
-
version: integer;
|
|
1100
|
-
/**
|
|
1101
|
-
* The content of the opened text document.
|
|
1102
|
-
*/
|
|
1103
|
-
text: string;
|
|
1104
|
-
}
|
|
1105
|
-
/**
|
|
1106
|
-
* The TextDocumentItem namespace provides helper functions to work with
|
|
1107
|
-
* {@link TextDocumentItem} literals.
|
|
1108
|
-
*/
|
|
1109
|
-
export declare namespace TextDocumentItem {
|
|
1110
|
-
/**
|
|
1111
|
-
* Creates a new TextDocumentItem literal.
|
|
1112
|
-
* @param uri The document's uri.
|
|
1113
|
-
* @param languageId The document's language identifier.
|
|
1114
|
-
* @param version The document's version number.
|
|
1115
|
-
* @param text The document's text.
|
|
1116
|
-
*/
|
|
1117
|
-
function create(uri: DocumentUri, languageId: string, version: integer, text: string): TextDocumentItem;
|
|
1118
|
-
/**
|
|
1119
|
-
* Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
|
|
1120
|
-
*/
|
|
1121
|
-
function is(value: any): value is TextDocumentItem;
|
|
1122
|
-
}
|
|
1123
|
-
/**
|
|
1124
|
-
* Describes the content type that a client supports in various
|
|
1125
|
-
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
1126
|
-
*
|
|
1127
|
-
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
1128
|
-
* are reserved for internal usage.
|
|
1129
|
-
*/
|
|
1130
|
-
export declare namespace MarkupKind {
|
|
1131
|
-
/**
|
|
1132
|
-
* Plain text is supported as a content format
|
|
1133
|
-
*/
|
|
1134
|
-
const PlainText: 'plaintext';
|
|
1135
|
-
/**
|
|
1136
|
-
* Markdown is supported as a content format
|
|
1137
|
-
*/
|
|
1138
|
-
const Markdown: 'markdown';
|
|
1139
|
-
/**
|
|
1140
|
-
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
1141
|
-
*/
|
|
1142
|
-
function is(value: any): value is MarkupKind;
|
|
1143
|
-
}
|
|
1144
|
-
export type MarkupKind = 'plaintext' | 'markdown';
|
|
1145
|
-
/**
|
|
1146
|
-
* A `MarkupContent` literal represents a string value which content is interpreted base on its
|
|
1147
|
-
* kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.
|
|
1148
|
-
*
|
|
1149
|
-
* If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.
|
|
1150
|
-
* See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
|
|
1151
|
-
*
|
|
1152
|
-
* Here is an example how such a string can be constructed using JavaScript / TypeScript:
|
|
1153
|
-
* ```ts
|
|
1154
|
-
* let markdown: MarkdownContent = {
|
|
1155
|
-
* kind: MarkupKind.Markdown,
|
|
1156
|
-
* value: [
|
|
1157
|
-
* '# Header',
|
|
1158
|
-
* 'Some text',
|
|
1159
|
-
* '```typescript',
|
|
1160
|
-
* 'someCode();',
|
|
1161
|
-
* '```'
|
|
1162
|
-
* ].join('\n')
|
|
1163
|
-
* };
|
|
1164
|
-
* ```
|
|
1165
|
-
*
|
|
1166
|
-
* *Please Note* that clients might sanitize the return markdown. A client could decide to
|
|
1167
|
-
* remove HTML from the markdown to avoid script execution.
|
|
1168
|
-
*/
|
|
1169
|
-
export interface MarkupContent {
|
|
1170
|
-
/**
|
|
1171
|
-
* The type of the Markup
|
|
1172
|
-
*/
|
|
1173
|
-
kind: MarkupKind;
|
|
1174
|
-
/**
|
|
1175
|
-
* The content itself
|
|
1176
|
-
*/
|
|
1177
|
-
value: string;
|
|
1178
|
-
}
|
|
1179
|
-
export declare namespace MarkupContent {
|
|
1180
|
-
/**
|
|
1181
|
-
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
1182
|
-
*/
|
|
1183
|
-
function is(value: any): value is MarkupContent;
|
|
1184
|
-
}
|
|
1185
|
-
/**
|
|
1186
|
-
* The kind of a completion entry.
|
|
1187
|
-
*/
|
|
1188
|
-
export declare namespace CompletionItemKind {
|
|
1189
|
-
const Text: 1;
|
|
1190
|
-
const Method: 2;
|
|
1191
|
-
const Function: 3;
|
|
1192
|
-
const Constructor: 4;
|
|
1193
|
-
const Field: 5;
|
|
1194
|
-
const Variable: 6;
|
|
1195
|
-
const Class: 7;
|
|
1196
|
-
const Interface: 8;
|
|
1197
|
-
const Module: 9;
|
|
1198
|
-
const Property: 10;
|
|
1199
|
-
const Unit: 11;
|
|
1200
|
-
const Value: 12;
|
|
1201
|
-
const Enum: 13;
|
|
1202
|
-
const Keyword: 14;
|
|
1203
|
-
const Snippet: 15;
|
|
1204
|
-
const Color: 16;
|
|
1205
|
-
const File: 17;
|
|
1206
|
-
const Reference: 18;
|
|
1207
|
-
const Folder: 19;
|
|
1208
|
-
const EnumMember: 20;
|
|
1209
|
-
const Constant: 21;
|
|
1210
|
-
const Struct: 22;
|
|
1211
|
-
const Event: 23;
|
|
1212
|
-
const Operator: 24;
|
|
1213
|
-
const TypeParameter: 25;
|
|
1214
|
-
}
|
|
1215
|
-
export type CompletionItemKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25;
|
|
1216
|
-
/**
|
|
1217
|
-
* Defines whether the insert text in a completion item should be interpreted as
|
|
1218
|
-
* plain text or a snippet.
|
|
1219
|
-
*/
|
|
1220
|
-
export declare namespace InsertTextFormat {
|
|
1221
|
-
/**
|
|
1222
|
-
* The primary text to be inserted is treated as a plain string.
|
|
1223
|
-
*/
|
|
1224
|
-
const PlainText: 1;
|
|
1225
|
-
/**
|
|
1226
|
-
* The primary text to be inserted is treated as a snippet.
|
|
1227
|
-
*
|
|
1228
|
-
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
1229
|
-
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
1230
|
-
* the end of the snippet. Placeholders with equal identifiers are linked,
|
|
1231
|
-
* that is typing in one will update others too.
|
|
1232
|
-
*
|
|
1233
|
-
* See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
|
|
1234
|
-
*/
|
|
1235
|
-
const Snippet: 2;
|
|
1236
|
-
}
|
|
1237
|
-
export type InsertTextFormat = 1 | 2;
|
|
1238
|
-
/**
|
|
1239
|
-
* Completion item tags are extra annotations that tweak the rendering of a completion
|
|
1240
|
-
* item.
|
|
1241
|
-
*
|
|
1242
|
-
* @since 3.15.0
|
|
1243
|
-
*/
|
|
1244
|
-
export declare namespace CompletionItemTag {
|
|
1245
|
-
/**
|
|
1246
|
-
* Render a completion as obsolete, usually using a strike-out.
|
|
1247
|
-
*/
|
|
1248
|
-
const Deprecated = 1;
|
|
1249
|
-
}
|
|
1250
|
-
export type CompletionItemTag = 1;
|
|
1251
|
-
/**
|
|
1252
|
-
* A special text edit to provide an insert and a replace operation.
|
|
1253
|
-
*
|
|
1254
|
-
* @since 3.16.0
|
|
1255
|
-
*/
|
|
1256
|
-
export interface InsertReplaceEdit {
|
|
1257
|
-
/**
|
|
1258
|
-
* The string to be inserted.
|
|
1259
|
-
*/
|
|
1260
|
-
newText: string;
|
|
1261
|
-
/**
|
|
1262
|
-
* The range if the insert is requested
|
|
1263
|
-
*/
|
|
1264
|
-
insert: Range;
|
|
1265
|
-
/**
|
|
1266
|
-
* The range if the replace is requested.
|
|
1267
|
-
*/
|
|
1268
|
-
replace: Range;
|
|
1269
|
-
}
|
|
1270
|
-
/**
|
|
1271
|
-
* The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
|
|
1272
|
-
*
|
|
1273
|
-
* @since 3.16.0
|
|
1274
|
-
*/
|
|
1275
|
-
export declare namespace InsertReplaceEdit {
|
|
1276
|
-
/**
|
|
1277
|
-
* Creates a new insert / replace edit
|
|
1278
|
-
*/
|
|
1279
|
-
function create(newText: string, insert: Range, replace: Range): InsertReplaceEdit;
|
|
1280
|
-
/**
|
|
1281
|
-
* Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
|
|
1282
|
-
*/
|
|
1283
|
-
function is(value: TextEdit | InsertReplaceEdit): value is InsertReplaceEdit;
|
|
1284
|
-
}
|
|
1285
|
-
/**
|
|
1286
|
-
* How whitespace and indentation is handled during completion
|
|
1287
|
-
* item insertion.
|
|
1288
|
-
*
|
|
1289
|
-
* @since 3.16.0
|
|
1290
|
-
*/
|
|
1291
|
-
export declare namespace InsertTextMode {
|
|
1292
|
-
/**
|
|
1293
|
-
* The insertion or replace strings is taken as it is. If the
|
|
1294
|
-
* value is multi line the lines below the cursor will be
|
|
1295
|
-
* inserted using the indentation defined in the string value.
|
|
1296
|
-
* The client will not apply any kind of adjustments to the
|
|
1297
|
-
* string.
|
|
1298
|
-
*/
|
|
1299
|
-
const asIs: 1;
|
|
1300
|
-
/**
|
|
1301
|
-
* The editor adjusts leading whitespace of new lines so that
|
|
1302
|
-
* they match the indentation up to the cursor of the line for
|
|
1303
|
-
* which the item is accepted.
|
|
1304
|
-
*
|
|
1305
|
-
* Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
|
|
1306
|
-
* multi line completion item is indented using 2 tabs and all
|
|
1307
|
-
* following lines inserted will be indented using 2 tabs as well.
|
|
1308
|
-
*/
|
|
1309
|
-
const adjustIndentation: 2;
|
|
1310
|
-
}
|
|
1311
|
-
export type InsertTextMode = 1 | 2;
|
|
1312
|
-
/**
|
|
1313
|
-
* Additional details for a completion item label.
|
|
1314
|
-
*
|
|
1315
|
-
* @since 3.17.0
|
|
1316
|
-
*/
|
|
1317
|
-
export interface CompletionItemLabelDetails {
|
|
1318
|
-
/**
|
|
1319
|
-
* An optional string which is rendered less prominently directly after {@link CompletionItem.label label},
|
|
1320
|
-
* without any spacing. Should be used for function signatures and type annotations.
|
|
1321
|
-
*/
|
|
1322
|
-
detail?: string;
|
|
1323
|
-
/**
|
|
1324
|
-
* An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used
|
|
1325
|
-
* for fully qualified names and file paths.
|
|
1326
|
-
*/
|
|
1327
|
-
description?: string;
|
|
1328
|
-
}
|
|
1329
|
-
export declare namespace CompletionItemLabelDetails {
|
|
1330
|
-
function is(value: any): value is CompletionItemLabelDetails;
|
|
1331
|
-
}
|
|
1332
|
-
/**
|
|
1333
|
-
* A completion item represents a text snippet that is
|
|
1334
|
-
* proposed to complete text that is being typed.
|
|
1335
|
-
*/
|
|
1336
|
-
export interface CompletionItem {
|
|
1337
|
-
/**
|
|
1338
|
-
* The label of this completion item.
|
|
1339
|
-
*
|
|
1340
|
-
* The label property is also by default the text that
|
|
1341
|
-
* is inserted when selecting this completion.
|
|
1342
|
-
*
|
|
1343
|
-
* If label details are provided the label itself should
|
|
1344
|
-
* be an unqualified name of the completion item.
|
|
1345
|
-
*/
|
|
1346
|
-
label: string;
|
|
1347
|
-
/**
|
|
1348
|
-
* Additional details for the label
|
|
1349
|
-
*
|
|
1350
|
-
* @since 3.17.0
|
|
1351
|
-
*/
|
|
1352
|
-
labelDetails?: CompletionItemLabelDetails;
|
|
1353
|
-
/**
|
|
1354
|
-
* The kind of this completion item. Based of the kind
|
|
1355
|
-
* an icon is chosen by the editor.
|
|
1356
|
-
*/
|
|
1357
|
-
kind?: CompletionItemKind;
|
|
1358
|
-
/**
|
|
1359
|
-
* Tags for this completion item.
|
|
1360
|
-
*
|
|
1361
|
-
* @since 3.15.0
|
|
1362
|
-
*/
|
|
1363
|
-
tags?: CompletionItemTag[];
|
|
1364
|
-
/**
|
|
1365
|
-
* A human-readable string with additional information
|
|
1366
|
-
* about this item, like type or symbol information.
|
|
1367
|
-
*/
|
|
1368
|
-
detail?: string;
|
|
1369
|
-
/**
|
|
1370
|
-
* A human-readable string that represents a doc-comment.
|
|
1371
|
-
*/
|
|
1372
|
-
documentation?: string | MarkupContent;
|
|
1373
|
-
/**
|
|
1374
|
-
* Indicates if this item is deprecated.
|
|
1375
|
-
* @deprecated Use `tags` instead.
|
|
1376
|
-
*/
|
|
1377
|
-
deprecated?: boolean;
|
|
1378
|
-
/**
|
|
1379
|
-
* Select this item when showing.
|
|
1380
|
-
*
|
|
1381
|
-
* *Note* that only one completion item can be selected and that the
|
|
1382
|
-
* tool / client decides which item that is. The rule is that the *first*
|
|
1383
|
-
* item of those that match best is selected.
|
|
1384
|
-
*/
|
|
1385
|
-
preselect?: boolean;
|
|
1386
|
-
/**
|
|
1387
|
-
* A string that should be used when comparing this item
|
|
1388
|
-
* with other items. When `falsy` the {@link CompletionItem.label label}
|
|
1389
|
-
* is used.
|
|
1390
|
-
*/
|
|
1391
|
-
sortText?: string;
|
|
1392
|
-
/**
|
|
1393
|
-
* A string that should be used when filtering a set of
|
|
1394
|
-
* completion items. When `falsy` the {@link CompletionItem.label label}
|
|
1395
|
-
* is used.
|
|
1396
|
-
*/
|
|
1397
|
-
filterText?: string;
|
|
1398
|
-
/**
|
|
1399
|
-
* A string that should be inserted into a document when selecting
|
|
1400
|
-
* this completion. When `falsy` the {@link CompletionItem.label label}
|
|
1401
|
-
* is used.
|
|
1402
|
-
*
|
|
1403
|
-
* The `insertText` is subject to interpretation by the client side.
|
|
1404
|
-
* Some tools might not take the string literally. For example
|
|
1405
|
-
* VS Code when code complete is requested in this example
|
|
1406
|
-
* `con<cursor position>` and a completion item with an `insertText` of
|
|
1407
|
-
* `console` is provided it will only insert `sole`. Therefore it is
|
|
1408
|
-
* recommended to use `textEdit` instead since it avoids additional client
|
|
1409
|
-
* side interpretation.
|
|
1410
|
-
*/
|
|
1411
|
-
insertText?: string;
|
|
1412
|
-
/**
|
|
1413
|
-
* The format of the insert text. The format applies to both the
|
|
1414
|
-
* `insertText` property and the `newText` property of a provided
|
|
1415
|
-
* `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`.
|
|
1416
|
-
*
|
|
1417
|
-
* Please note that the insertTextFormat doesn't apply to
|
|
1418
|
-
* `additionalTextEdits`.
|
|
1419
|
-
*/
|
|
1420
|
-
insertTextFormat?: InsertTextFormat;
|
|
1421
|
-
/**
|
|
1422
|
-
* How whitespace and indentation is handled during completion
|
|
1423
|
-
* item insertion. If not provided the clients default value depends on
|
|
1424
|
-
* the `textDocument.completion.insertTextMode` client capability.
|
|
1425
|
-
*
|
|
1426
|
-
* @since 3.16.0
|
|
1427
|
-
*/
|
|
1428
|
-
insertTextMode?: InsertTextMode;
|
|
1429
|
-
/**
|
|
1430
|
-
* An {@link TextEdit edit} which is applied to a document when selecting
|
|
1431
|
-
* this completion. When an edit is provided the value of
|
|
1432
|
-
* {@link CompletionItem.insertText insertText} is ignored.
|
|
1433
|
-
*
|
|
1434
|
-
* Most editors support two different operations when accepting a completion
|
|
1435
|
-
* item. One is to insert a completion text and the other is to replace an
|
|
1436
|
-
* existing text with a completion text. Since this can usually not be
|
|
1437
|
-
* predetermined by a server it can report both ranges. Clients need to
|
|
1438
|
-
* signal support for `InsertReplaceEdits` via the
|
|
1439
|
-
* `textDocument.completion.insertReplaceSupport` client capability
|
|
1440
|
-
* property.
|
|
1441
|
-
*
|
|
1442
|
-
* *Note 1:* The text edit's range as well as both ranges from an insert
|
|
1443
|
-
* replace edit must be a [single line] and they must contain the position
|
|
1444
|
-
* at which completion has been requested.
|
|
1445
|
-
* *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range
|
|
1446
|
-
* must be a prefix of the edit's replace range, that means it must be
|
|
1447
|
-
* contained and starting at the same position.
|
|
1448
|
-
*
|
|
1449
|
-
* @since 3.16.0 additional type `InsertReplaceEdit`
|
|
1450
|
-
*/
|
|
1451
|
-
textEdit?: TextEdit | InsertReplaceEdit;
|
|
1452
|
-
/**
|
|
1453
|
-
* The edit text used if the completion item is part of a CompletionList and
|
|
1454
|
-
* CompletionList defines an item default for the text edit range.
|
|
1455
|
-
*
|
|
1456
|
-
* Clients will only honor this property if they opt into completion list
|
|
1457
|
-
* item defaults using the capability `completionList.itemDefaults`.
|
|
1458
|
-
*
|
|
1459
|
-
* If not provided and a list's default range is provided the label
|
|
1460
|
-
* property is used as a text.
|
|
1461
|
-
*
|
|
1462
|
-
* @since 3.17.0
|
|
1463
|
-
*/
|
|
1464
|
-
textEditText?: string;
|
|
1465
|
-
/**
|
|
1466
|
-
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
1467
|
-
* selecting this completion. Edits must not overlap (including the same insert position)
|
|
1468
|
-
* with the main {@link CompletionItem.textEdit edit} nor with themselves.
|
|
1469
|
-
*
|
|
1470
|
-
* Additional text edits should be used to change text unrelated to the current cursor position
|
|
1471
|
-
* (for example adding an import statement at the top of the file if the completion item will
|
|
1472
|
-
* insert an unqualified type).
|
|
1473
|
-
*/
|
|
1474
|
-
additionalTextEdits?: TextEdit[];
|
|
1475
|
-
/**
|
|
1476
|
-
* An optional set of characters that when pressed while this completion is active will accept it first and
|
|
1477
|
-
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
|
1478
|
-
* characters will be ignored.
|
|
1479
|
-
*/
|
|
1480
|
-
commitCharacters?: string[];
|
|
1481
|
-
/**
|
|
1482
|
-
* An optional {@link Command command} that is executed *after* inserting this completion. *Note* that
|
|
1483
|
-
* additional modifications to the current document should be described with the
|
|
1484
|
-
* {@link CompletionItem.additionalTextEdits additionalTextEdits}-property.
|
|
1485
|
-
*/
|
|
1486
|
-
command?: Command;
|
|
1487
|
-
/**
|
|
1488
|
-
* A data entry field that is preserved on a completion item between a
|
|
1489
|
-
* {@link CompletionRequest} and a {@link CompletionResolveRequest}.
|
|
1490
|
-
*/
|
|
1491
|
-
data?: LSPAny;
|
|
1492
|
-
}
|
|
1493
|
-
/**
|
|
1494
|
-
* The CompletionItem namespace provides functions to deal with
|
|
1495
|
-
* completion items.
|
|
1496
|
-
*/
|
|
1497
|
-
export declare namespace CompletionItem {
|
|
1498
|
-
/**
|
|
1499
|
-
* Create a completion item and seed it with a label.
|
|
1500
|
-
* @param label The completion item's label
|
|
1501
|
-
*/
|
|
1502
|
-
function create(label: string): CompletionItem;
|
|
1503
|
-
}
|
|
1504
|
-
/**
|
|
1505
|
-
* Represents a collection of {@link CompletionItem completion items} to be presented
|
|
1506
|
-
* in the editor.
|
|
1507
|
-
*/
|
|
1508
|
-
export interface CompletionList {
|
|
1509
|
-
/**
|
|
1510
|
-
* This list it not complete. Further typing results in recomputing this list.
|
|
1511
|
-
*
|
|
1512
|
-
* Recomputed lists have all their items replaced (not appended) in the
|
|
1513
|
-
* incomplete completion sessions.
|
|
1514
|
-
*/
|
|
1515
|
-
isIncomplete: boolean;
|
|
1516
|
-
/**
|
|
1517
|
-
* In many cases the items of an actual completion result share the same
|
|
1518
|
-
* value for properties like `commitCharacters` or the range of a text
|
|
1519
|
-
* edit. A completion list can therefore define item defaults which will
|
|
1520
|
-
* be used if a completion item itself doesn't specify the value.
|
|
1521
|
-
*
|
|
1522
|
-
* If a completion list specifies a default value and a completion item
|
|
1523
|
-
* also specifies a corresponding value the one from the item is used.
|
|
1524
|
-
*
|
|
1525
|
-
* Servers are only allowed to return default values if the client
|
|
1526
|
-
* signals support for this via the `completionList.itemDefaults`
|
|
1527
|
-
* capability.
|
|
1528
|
-
*
|
|
1529
|
-
* @since 3.17.0
|
|
1530
|
-
*/
|
|
1531
|
-
itemDefaults?: {
|
|
1532
|
-
/**
|
|
1533
|
-
* A default commit character set.
|
|
1534
|
-
*
|
|
1535
|
-
* @since 3.17.0
|
|
1536
|
-
*/
|
|
1537
|
-
commitCharacters?: string[];
|
|
1538
|
-
/**
|
|
1539
|
-
* A default edit range.
|
|
1540
|
-
*
|
|
1541
|
-
* @since 3.17.0
|
|
1542
|
-
*/
|
|
1543
|
-
editRange?: Range | {
|
|
1544
|
-
insert: Range;
|
|
1545
|
-
replace: Range;
|
|
1546
|
-
};
|
|
1547
|
-
/**
|
|
1548
|
-
* A default insert text format.
|
|
1549
|
-
*
|
|
1550
|
-
* @since 3.17.0
|
|
1551
|
-
*/
|
|
1552
|
-
insertTextFormat?: InsertTextFormat;
|
|
1553
|
-
/**
|
|
1554
|
-
* A default insert text mode.
|
|
1555
|
-
*
|
|
1556
|
-
* @since 3.17.0
|
|
1557
|
-
*/
|
|
1558
|
-
insertTextMode?: InsertTextMode;
|
|
1559
|
-
/**
|
|
1560
|
-
* A default data value.
|
|
1561
|
-
*
|
|
1562
|
-
* @since 3.17.0
|
|
1563
|
-
*/
|
|
1564
|
-
data?: LSPAny;
|
|
1565
|
-
};
|
|
1566
|
-
/**
|
|
1567
|
-
* The completion items.
|
|
1568
|
-
*/
|
|
1569
|
-
items: CompletionItem[];
|
|
1570
|
-
}
|
|
1571
|
-
/**
|
|
1572
|
-
* The CompletionList namespace provides functions to deal with
|
|
1573
|
-
* completion lists.
|
|
1574
|
-
*/
|
|
1575
|
-
export declare namespace CompletionList {
|
|
1576
|
-
/**
|
|
1577
|
-
* Creates a new completion list.
|
|
1578
|
-
*
|
|
1579
|
-
* @param items The completion items.
|
|
1580
|
-
* @param isIncomplete The list is not complete.
|
|
1581
|
-
*/
|
|
1582
|
-
function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList;
|
|
1583
|
-
}
|
|
1584
|
-
/**
|
|
1585
|
-
* MarkedString can be used to render human readable text. It is either a markdown string
|
|
1586
|
-
* or a code-block that provides a language and a code snippet. The language identifier
|
|
1587
|
-
* is semantically equal to the optional language identifier in fenced code blocks in GitHub
|
|
1588
|
-
* issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
|
|
1589
|
-
*
|
|
1590
|
-
* The pair of a language and a value is an equivalent to markdown:
|
|
1591
|
-
* ```${language}
|
|
1592
|
-
* ${value}
|
|
1593
|
-
* ```
|
|
1594
|
-
*
|
|
1595
|
-
* Note that markdown strings will be sanitized - that means html will be escaped.
|
|
1596
|
-
* @deprecated use MarkupContent instead.
|
|
1597
|
-
*/
|
|
1598
|
-
export type MarkedString = string | {
|
|
1599
|
-
language: string;
|
|
1600
|
-
value: string;
|
|
1601
|
-
};
|
|
1602
|
-
export declare namespace MarkedString {
|
|
1603
|
-
/**
|
|
1604
|
-
* Creates a marked string from plain text.
|
|
1605
|
-
*
|
|
1606
|
-
* @param plainText The plain text.
|
|
1607
|
-
*/
|
|
1608
|
-
function fromPlainText(plainText: string): string;
|
|
1609
|
-
/**
|
|
1610
|
-
* Checks whether the given value conforms to the {@link MarkedString} type.
|
|
1611
|
-
*/
|
|
1612
|
-
function is(value: any): value is MarkedString;
|
|
1613
|
-
}
|
|
1614
|
-
/**
|
|
1615
|
-
* The result of a hover request.
|
|
1616
|
-
*/
|
|
1617
|
-
export interface Hover {
|
|
1618
|
-
/**
|
|
1619
|
-
* The hover's content
|
|
1620
|
-
*/
|
|
1621
|
-
contents: MarkupContent | MarkedString | MarkedString[];
|
|
1622
|
-
/**
|
|
1623
|
-
* An optional range inside the text document that is used to
|
|
1624
|
-
* visualize the hover, e.g. by changing the background color.
|
|
1625
|
-
*/
|
|
1626
|
-
range?: Range;
|
|
1627
|
-
}
|
|
1628
|
-
export declare namespace Hover {
|
|
1629
|
-
/**
|
|
1630
|
-
* Checks whether the given value conforms to the {@link Hover} interface.
|
|
1631
|
-
*/
|
|
1632
|
-
function is(value: any): value is Hover;
|
|
1633
|
-
}
|
|
1634
|
-
/**
|
|
1635
|
-
* Represents a parameter of a callable-signature. A parameter can
|
|
1636
|
-
* have a label and a doc-comment.
|
|
1637
|
-
*/
|
|
1638
|
-
export interface ParameterInformation {
|
|
1639
|
-
/**
|
|
1640
|
-
* The label of this parameter information.
|
|
1641
|
-
*
|
|
1642
|
-
* Either a string or an inclusive start and exclusive end offsets within its containing
|
|
1643
|
-
* signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
|
|
1644
|
-
* string representation as `Position` and `Range` does.
|
|
1645
|
-
*
|
|
1646
|
-
* *Note*: a label of type string should be a substring of its containing signature label.
|
|
1647
|
-
* Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
|
|
1648
|
-
*/
|
|
1649
|
-
label: string | [uinteger, uinteger];
|
|
1650
|
-
/**
|
|
1651
|
-
* The human-readable doc-comment of this parameter. Will be shown
|
|
1652
|
-
* in the UI but can be omitted.
|
|
1653
|
-
*/
|
|
1654
|
-
documentation?: string | MarkupContent;
|
|
1655
|
-
}
|
|
1656
|
-
/**
|
|
1657
|
-
* The ParameterInformation namespace provides helper functions to work with
|
|
1658
|
-
* {@link ParameterInformation} literals.
|
|
1659
|
-
*/
|
|
1660
|
-
export declare namespace ParameterInformation {
|
|
1661
|
-
/**
|
|
1662
|
-
* Creates a new parameter information literal.
|
|
1663
|
-
*
|
|
1664
|
-
* @param label A label string.
|
|
1665
|
-
* @param documentation A doc string.
|
|
1666
|
-
*/
|
|
1667
|
-
function create(label: string | [uinteger, uinteger], documentation?: string): ParameterInformation;
|
|
1668
|
-
}
|
|
1669
|
-
/**
|
|
1670
|
-
* Represents the signature of something callable. A signature
|
|
1671
|
-
* can have a label, like a function-name, a doc-comment, and
|
|
1672
|
-
* a set of parameters.
|
|
1673
|
-
*/
|
|
1674
|
-
export interface SignatureInformation {
|
|
1675
|
-
/**
|
|
1676
|
-
* The label of this signature. Will be shown in
|
|
1677
|
-
* the UI.
|
|
1678
|
-
*/
|
|
1679
|
-
label: string;
|
|
1680
|
-
/**
|
|
1681
|
-
* The human-readable doc-comment of this signature. Will be shown
|
|
1682
|
-
* in the UI but can be omitted.
|
|
1683
|
-
*/
|
|
1684
|
-
documentation?: string | MarkupContent;
|
|
1685
|
-
/**
|
|
1686
|
-
* The parameters of this signature.
|
|
1687
|
-
*/
|
|
1688
|
-
parameters?: ParameterInformation[];
|
|
1689
|
-
/**
|
|
1690
|
-
* The index of the active parameter.
|
|
1691
|
-
*
|
|
1692
|
-
* If provided, this is used in place of `SignatureHelp.activeParameter`.
|
|
1693
|
-
*
|
|
1694
|
-
* @since 3.16.0
|
|
1695
|
-
*/
|
|
1696
|
-
activeParameter?: uinteger;
|
|
1697
|
-
}
|
|
1698
|
-
/**
|
|
1699
|
-
* The SignatureInformation namespace provides helper functions to work with
|
|
1700
|
-
* {@link SignatureInformation} literals.
|
|
1701
|
-
*/
|
|
1702
|
-
export declare namespace SignatureInformation {
|
|
1703
|
-
function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation;
|
|
1704
|
-
}
|
|
1705
|
-
/**
|
|
1706
|
-
* Signature help represents the signature of something
|
|
1707
|
-
* callable. There can be multiple signature but only one
|
|
1708
|
-
* active and only one active parameter.
|
|
1709
|
-
*/
|
|
1710
|
-
export interface SignatureHelp {
|
|
1711
|
-
/**
|
|
1712
|
-
* One or more signatures.
|
|
1713
|
-
*/
|
|
1714
|
-
signatures: SignatureInformation[];
|
|
1715
|
-
/**
|
|
1716
|
-
* The active signature. If omitted or the value lies outside the
|
|
1717
|
-
* range of `signatures` the value defaults to zero or is ignored if
|
|
1718
|
-
* the `SignatureHelp` has no signatures.
|
|
1719
|
-
*
|
|
1720
|
-
* Whenever possible implementors should make an active decision about
|
|
1721
|
-
* the active signature and shouldn't rely on a default value.
|
|
1722
|
-
*
|
|
1723
|
-
* In future version of the protocol this property might become
|
|
1724
|
-
* mandatory to better express this.
|
|
1725
|
-
*/
|
|
1726
|
-
activeSignature?: uinteger;
|
|
1727
|
-
/**
|
|
1728
|
-
* The active parameter of the active signature. If omitted or the value
|
|
1729
|
-
* lies outside the range of `signatures[activeSignature].parameters`
|
|
1730
|
-
* defaults to 0 if the active signature has parameters. If
|
|
1731
|
-
* the active signature has no parameters it is ignored.
|
|
1732
|
-
* In future version of the protocol this property might become
|
|
1733
|
-
* mandatory to better express the active parameter if the
|
|
1734
|
-
* active signature does have any.
|
|
1735
|
-
*/
|
|
1736
|
-
activeParameter?: uinteger;
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* The definition of a symbol represented as one or many {@link Location locations}.
|
|
1740
|
-
* For most programming languages there is only one location at which a symbol is
|
|
1741
|
-
* defined.
|
|
1742
|
-
*
|
|
1743
|
-
* Servers should prefer returning `DefinitionLink` over `Definition` if supported
|
|
1744
|
-
* by the client.
|
|
1745
|
-
*/
|
|
1746
|
-
export type Definition = Location | Location[];
|
|
1747
|
-
/**
|
|
1748
|
-
* Information about where a symbol is defined.
|
|
1749
|
-
*
|
|
1750
|
-
* Provides additional metadata over normal {@link Location location} definitions, including the range of
|
|
1751
|
-
* the defining symbol
|
|
1752
|
-
*/
|
|
1753
|
-
export type DefinitionLink = LocationLink;
|
|
1754
|
-
/**
|
|
1755
|
-
* The declaration of a symbol representation as one or many {@link Location locations}.
|
|
1756
|
-
*/
|
|
1757
|
-
export type Declaration = Location | Location[];
|
|
1758
|
-
/**
|
|
1759
|
-
* Information about where a symbol is declared.
|
|
1760
|
-
*
|
|
1761
|
-
* Provides additional metadata over normal {@link Location location} declarations, including the range of
|
|
1762
|
-
* the declaring symbol.
|
|
1763
|
-
*
|
|
1764
|
-
* Servers should prefer returning `DeclarationLink` over `Declaration` if supported
|
|
1765
|
-
* by the client.
|
|
1766
|
-
*/
|
|
1767
|
-
export type DeclarationLink = LocationLink;
|
|
1768
|
-
/**
|
|
1769
|
-
* Value-object that contains additional information when
|
|
1770
|
-
* requesting references.
|
|
1771
|
-
*/
|
|
1772
|
-
export interface ReferenceContext {
|
|
1773
|
-
/**
|
|
1774
|
-
* Include the declaration of the current symbol.
|
|
1775
|
-
*/
|
|
1776
|
-
includeDeclaration: boolean;
|
|
1777
|
-
}
|
|
1778
|
-
/**
|
|
1779
|
-
* A document highlight kind.
|
|
1780
|
-
*/
|
|
1781
|
-
export declare namespace DocumentHighlightKind {
|
|
1782
|
-
/**
|
|
1783
|
-
* A textual occurrence.
|
|
1784
|
-
*/
|
|
1785
|
-
const Text: 1;
|
|
1786
|
-
/**
|
|
1787
|
-
* Read-access of a symbol, like reading a variable.
|
|
1788
|
-
*/
|
|
1789
|
-
const Read: 2;
|
|
1790
|
-
/**
|
|
1791
|
-
* Write-access of a symbol, like writing to a variable.
|
|
1792
|
-
*/
|
|
1793
|
-
const Write: 3;
|
|
1794
|
-
}
|
|
1795
|
-
export type DocumentHighlightKind = 1 | 2 | 3;
|
|
1796
|
-
/**
|
|
1797
|
-
* A document highlight is a range inside a text document which deserves
|
|
1798
|
-
* special attention. Usually a document highlight is visualized by changing
|
|
1799
|
-
* the background color of its range.
|
|
1800
|
-
*/
|
|
1801
|
-
export interface DocumentHighlight {
|
|
1802
|
-
/**
|
|
1803
|
-
* The range this highlight applies to.
|
|
1804
|
-
*/
|
|
1805
|
-
range: Range;
|
|
1806
|
-
/**
|
|
1807
|
-
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
|
1808
|
-
*/
|
|
1809
|
-
kind?: DocumentHighlightKind;
|
|
1810
|
-
}
|
|
1811
|
-
/**
|
|
1812
|
-
* DocumentHighlight namespace to provide helper functions to work with
|
|
1813
|
-
* {@link DocumentHighlight} literals.
|
|
1814
|
-
*/
|
|
1815
|
-
export declare namespace DocumentHighlight {
|
|
1816
|
-
/**
|
|
1817
|
-
* Create a DocumentHighlight object.
|
|
1818
|
-
* @param range The range the highlight applies to.
|
|
1819
|
-
* @param kind The highlight kind
|
|
1820
|
-
*/
|
|
1821
|
-
function create(range: Range, kind?: DocumentHighlightKind): DocumentHighlight;
|
|
1822
|
-
}
|
|
1823
|
-
/**
|
|
1824
|
-
* A symbol kind.
|
|
1825
|
-
*/
|
|
1826
|
-
export declare namespace SymbolKind {
|
|
1827
|
-
const File: 1;
|
|
1828
|
-
const Module: 2;
|
|
1829
|
-
const Namespace: 3;
|
|
1830
|
-
const Package: 4;
|
|
1831
|
-
const Class: 5;
|
|
1832
|
-
const Method: 6;
|
|
1833
|
-
const Property: 7;
|
|
1834
|
-
const Field: 8;
|
|
1835
|
-
const Constructor: 9;
|
|
1836
|
-
const Enum: 10;
|
|
1837
|
-
const Interface: 11;
|
|
1838
|
-
const Function: 12;
|
|
1839
|
-
const Variable: 13;
|
|
1840
|
-
const Constant: 14;
|
|
1841
|
-
const String: 15;
|
|
1842
|
-
const Number: 16;
|
|
1843
|
-
const Boolean: 17;
|
|
1844
|
-
const Array: 18;
|
|
1845
|
-
const Object: 19;
|
|
1846
|
-
const Key: 20;
|
|
1847
|
-
const Null: 21;
|
|
1848
|
-
const EnumMember: 22;
|
|
1849
|
-
const Struct: 23;
|
|
1850
|
-
const Event: 24;
|
|
1851
|
-
const Operator: 25;
|
|
1852
|
-
const TypeParameter: 26;
|
|
1853
|
-
}
|
|
1854
|
-
export type SymbolKind = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26;
|
|
1855
|
-
/**
|
|
1856
|
-
* Symbol tags are extra annotations that tweak the rendering of a symbol.
|
|
1857
|
-
*
|
|
1858
|
-
* @since 3.16
|
|
1859
|
-
*/
|
|
1860
|
-
export declare namespace SymbolTag {
|
|
1861
|
-
/**
|
|
1862
|
-
* Render a symbol as obsolete, usually using a strike-out.
|
|
1863
|
-
*/
|
|
1864
|
-
const Deprecated: 1;
|
|
1865
|
-
}
|
|
1866
|
-
export type SymbolTag = 1;
|
|
1867
|
-
/**
|
|
1868
|
-
* A base for all symbol information.
|
|
1869
|
-
*/
|
|
1870
|
-
export interface BaseSymbolInformation {
|
|
1871
|
-
/**
|
|
1872
|
-
* The name of this symbol.
|
|
1873
|
-
*/
|
|
1874
|
-
name: string;
|
|
1875
|
-
/**
|
|
1876
|
-
* The kind of this symbol.
|
|
1877
|
-
*/
|
|
1878
|
-
kind: SymbolKind;
|
|
1879
|
-
/**
|
|
1880
|
-
* Tags for this symbol.
|
|
1881
|
-
*
|
|
1882
|
-
* @since 3.16.0
|
|
1883
|
-
*/
|
|
1884
|
-
tags?: SymbolTag[];
|
|
1885
|
-
/**
|
|
1886
|
-
* The name of the symbol containing this symbol. This information is for
|
|
1887
|
-
* user interface purposes (e.g. to render a qualifier in the user interface
|
|
1888
|
-
* if necessary). It can't be used to re-infer a hierarchy for the document
|
|
1889
|
-
* symbols.
|
|
1890
|
-
*/
|
|
1891
|
-
containerName?: string;
|
|
1892
|
-
}
|
|
1893
|
-
/**
|
|
1894
|
-
* Represents information about programming constructs like variables, classes,
|
|
1895
|
-
* interfaces etc.
|
|
1896
|
-
*/
|
|
1897
|
-
export interface SymbolInformation extends BaseSymbolInformation {
|
|
1898
|
-
/**
|
|
1899
|
-
* Indicates if this symbol is deprecated.
|
|
1900
|
-
*
|
|
1901
|
-
* @deprecated Use tags instead
|
|
1902
|
-
*/
|
|
1903
|
-
deprecated?: boolean;
|
|
1904
|
-
/**
|
|
1905
|
-
* The location of this symbol. The location's range is used by a tool
|
|
1906
|
-
* to reveal the location in the editor. If the symbol is selected in the
|
|
1907
|
-
* tool the range's start information is used to position the cursor. So
|
|
1908
|
-
* the range usually spans more than the actual symbol's name and does
|
|
1909
|
-
* normally include things like visibility modifiers.
|
|
1910
|
-
*
|
|
1911
|
-
* The range doesn't have to denote a node range in the sense of an abstract
|
|
1912
|
-
* syntax tree. It can therefore not be used to re-construct a hierarchy of
|
|
1913
|
-
* the symbols.
|
|
1914
|
-
*/
|
|
1915
|
-
location: Location;
|
|
1916
|
-
}
|
|
1917
|
-
export declare namespace SymbolInformation {
|
|
1918
|
-
/**
|
|
1919
|
-
* Creates a new symbol information literal.
|
|
1920
|
-
*
|
|
1921
|
-
* @param name The name of the symbol.
|
|
1922
|
-
* @param kind The kind of the symbol.
|
|
1923
|
-
* @param range The range of the location of the symbol.
|
|
1924
|
-
* @param uri The resource of the location of symbol.
|
|
1925
|
-
* @param containerName The name of the symbol containing the symbol.
|
|
1926
|
-
*/
|
|
1927
|
-
function create(name: string, kind: SymbolKind, range: Range, uri: DocumentUri, containerName?: string): SymbolInformation;
|
|
1928
|
-
}
|
|
1929
|
-
/**
|
|
1930
|
-
* A special workspace symbol that supports locations without a range.
|
|
1931
|
-
*
|
|
1932
|
-
* See also SymbolInformation.
|
|
1933
|
-
*
|
|
1934
|
-
* @since 3.17.0
|
|
1935
|
-
*/
|
|
1936
|
-
export interface WorkspaceSymbol extends BaseSymbolInformation {
|
|
1937
|
-
/**
|
|
1938
|
-
* The location of the symbol. Whether a server is allowed to
|
|
1939
|
-
* return a location without a range depends on the client
|
|
1940
|
-
* capability `workspace.symbol.resolveSupport`.
|
|
1941
|
-
*
|
|
1942
|
-
* See SymbolInformation#location for more details.
|
|
1943
|
-
*/
|
|
1944
|
-
location: Location | {
|
|
1945
|
-
uri: DocumentUri;
|
|
1946
|
-
};
|
|
1947
|
-
/**
|
|
1948
|
-
* A data entry field that is preserved on a workspace symbol between a
|
|
1949
|
-
* workspace symbol request and a workspace symbol resolve request.
|
|
1950
|
-
*/
|
|
1951
|
-
data?: LSPAny;
|
|
1952
|
-
}
|
|
1953
|
-
export declare namespace WorkspaceSymbol {
|
|
1954
|
-
/**
|
|
1955
|
-
* Create a new workspace symbol.
|
|
1956
|
-
*
|
|
1957
|
-
* @param name The name of the symbol.
|
|
1958
|
-
* @param kind The kind of the symbol.
|
|
1959
|
-
* @param uri The resource of the location of the symbol.
|
|
1960
|
-
* @param range An options range of the location.
|
|
1961
|
-
* @returns A WorkspaceSymbol.
|
|
1962
|
-
*/
|
|
1963
|
-
function create(name: string, kind: SymbolKind, uri: DocumentUri, range?: Range): WorkspaceSymbol;
|
|
1964
|
-
}
|
|
1965
|
-
/**
|
|
1966
|
-
* Represents programming constructs like variables, classes, interfaces etc.
|
|
1967
|
-
* that appear in a document. Document symbols can be hierarchical and they
|
|
1968
|
-
* have two ranges: one that encloses its definition and one that points to
|
|
1969
|
-
* its most interesting range, e.g. the range of an identifier.
|
|
1970
|
-
*/
|
|
1971
|
-
export interface DocumentSymbol {
|
|
1972
|
-
/**
|
|
1973
|
-
* The name of this symbol. Will be displayed in the user interface and therefore must not be
|
|
1974
|
-
* an empty string or a string only consisting of white spaces.
|
|
1975
|
-
*/
|
|
1976
|
-
name: string;
|
|
1977
|
-
/**
|
|
1978
|
-
* More detail for this symbol, e.g the signature of a function.
|
|
1979
|
-
*/
|
|
1980
|
-
detail?: string;
|
|
1981
|
-
/**
|
|
1982
|
-
* The kind of this symbol.
|
|
1983
|
-
*/
|
|
1984
|
-
kind: SymbolKind;
|
|
1985
|
-
/**
|
|
1986
|
-
* Tags for this document symbol.
|
|
1987
|
-
*
|
|
1988
|
-
* @since 3.16.0
|
|
1989
|
-
*/
|
|
1990
|
-
tags?: SymbolTag[];
|
|
1991
|
-
/**
|
|
1992
|
-
* Indicates if this symbol is deprecated.
|
|
1993
|
-
*
|
|
1994
|
-
* @deprecated Use tags instead
|
|
1995
|
-
*/
|
|
1996
|
-
deprecated?: boolean;
|
|
1997
|
-
/**
|
|
1998
|
-
* The range enclosing this symbol not including leading/trailing whitespace but everything else
|
|
1999
|
-
* like comments. This information is typically used to determine if the clients cursor is
|
|
2000
|
-
* inside the symbol to reveal in the symbol in the UI.
|
|
2001
|
-
*/
|
|
2002
|
-
range: Range;
|
|
2003
|
-
/**
|
|
2004
|
-
* The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
|
|
2005
|
-
* Must be contained by the `range`.
|
|
2006
|
-
*/
|
|
2007
|
-
selectionRange: Range;
|
|
2008
|
-
/**
|
|
2009
|
-
* Children of this symbol, e.g. properties of a class.
|
|
2010
|
-
*/
|
|
2011
|
-
children?: DocumentSymbol[];
|
|
2012
|
-
}
|
|
2013
|
-
export declare namespace DocumentSymbol {
|
|
2014
|
-
/**
|
|
2015
|
-
* Creates a new symbol information literal.
|
|
2016
|
-
*
|
|
2017
|
-
* @param name The name of the symbol.
|
|
2018
|
-
* @param detail The detail of the symbol.
|
|
2019
|
-
* @param kind The kind of the symbol.
|
|
2020
|
-
* @param range The range of the symbol.
|
|
2021
|
-
* @param selectionRange The selectionRange of the symbol.
|
|
2022
|
-
* @param children Children of the symbol.
|
|
2023
|
-
*/
|
|
2024
|
-
function create(name: string, detail: string | undefined, kind: SymbolKind, range: Range, selectionRange: Range, children?: DocumentSymbol[]): DocumentSymbol;
|
|
2025
|
-
/**
|
|
2026
|
-
* Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
|
|
2027
|
-
*/
|
|
2028
|
-
function is(value: any): value is DocumentSymbol;
|
|
2029
|
-
}
|
|
2030
|
-
/**
|
|
2031
|
-
* The kind of a code action.
|
|
2032
|
-
*
|
|
2033
|
-
* Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`.
|
|
2034
|
-
*
|
|
2035
|
-
* The set of kinds is open and client needs to announce the kinds it supports to the server during
|
|
2036
|
-
* initialization.
|
|
2037
|
-
*/
|
|
2038
|
-
export type CodeActionKind = string;
|
|
2039
|
-
/**
|
|
2040
|
-
* A set of predefined code action kinds
|
|
2041
|
-
*/
|
|
2042
|
-
export declare namespace CodeActionKind {
|
|
2043
|
-
/**
|
|
2044
|
-
* Empty kind.
|
|
2045
|
-
*/
|
|
2046
|
-
const Empty: '';
|
|
2047
|
-
/**
|
|
2048
|
-
* Base kind for quickfix actions: 'quickfix'
|
|
2049
|
-
*/
|
|
2050
|
-
const QuickFix: 'quickfix';
|
|
2051
|
-
/**
|
|
2052
|
-
* Base kind for refactoring actions: 'refactor'
|
|
2053
|
-
*/
|
|
2054
|
-
const Refactor: 'refactor';
|
|
2055
|
-
/**
|
|
2056
|
-
* Base kind for refactoring extraction actions: 'refactor.extract'
|
|
2057
|
-
*
|
|
2058
|
-
* Example extract actions:
|
|
2059
|
-
*
|
|
2060
|
-
* - Extract method
|
|
2061
|
-
* - Extract function
|
|
2062
|
-
* - Extract variable
|
|
2063
|
-
* - Extract interface from class
|
|
2064
|
-
* - ...
|
|
2065
|
-
*/
|
|
2066
|
-
const RefactorExtract: 'refactor.extract';
|
|
2067
|
-
/**
|
|
2068
|
-
* Base kind for refactoring inline actions: 'refactor.inline'
|
|
2069
|
-
*
|
|
2070
|
-
* Example inline actions:
|
|
2071
|
-
*
|
|
2072
|
-
* - Inline function
|
|
2073
|
-
* - Inline variable
|
|
2074
|
-
* - Inline constant
|
|
2075
|
-
* - ...
|
|
2076
|
-
*/
|
|
2077
|
-
const RefactorInline: 'refactor.inline';
|
|
2078
|
-
/**
|
|
2079
|
-
* Base kind for refactoring rewrite actions: 'refactor.rewrite'
|
|
2080
|
-
*
|
|
2081
|
-
* Example rewrite actions:
|
|
2082
|
-
*
|
|
2083
|
-
* - Convert JavaScript function to class
|
|
2084
|
-
* - Add or remove parameter
|
|
2085
|
-
* - Encapsulate field
|
|
2086
|
-
* - Make method static
|
|
2087
|
-
* - Move method to base class
|
|
2088
|
-
* - ...
|
|
2089
|
-
*/
|
|
2090
|
-
const RefactorRewrite: 'refactor.rewrite';
|
|
2091
|
-
/**
|
|
2092
|
-
* Base kind for source actions: `source`
|
|
2093
|
-
*
|
|
2094
|
-
* Source code actions apply to the entire file.
|
|
2095
|
-
*/
|
|
2096
|
-
const Source: 'source';
|
|
2097
|
-
/**
|
|
2098
|
-
* Base kind for an organize imports source action: `source.organizeImports`
|
|
2099
|
-
*/
|
|
2100
|
-
const SourceOrganizeImports: 'source.organizeImports';
|
|
2101
|
-
/**
|
|
2102
|
-
* Base kind for auto-fix source actions: `source.fixAll`.
|
|
2103
|
-
*
|
|
2104
|
-
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
|
|
2105
|
-
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
|
|
2106
|
-
*
|
|
2107
|
-
* @since 3.15.0
|
|
2108
|
-
*/
|
|
2109
|
-
const SourceFixAll: 'source.fixAll';
|
|
2110
|
-
}
|
|
2111
|
-
/**
|
|
2112
|
-
* The reason why code actions were requested.
|
|
2113
|
-
*
|
|
2114
|
-
* @since 3.17.0
|
|
2115
|
-
*/
|
|
2116
|
-
export declare namespace CodeActionTriggerKind {
|
|
2117
|
-
/**
|
|
2118
|
-
* Code actions were explicitly requested by the user or by an extension.
|
|
2119
|
-
*/
|
|
2120
|
-
const Invoked: 1;
|
|
2121
|
-
/**
|
|
2122
|
-
* Code actions were requested automatically.
|
|
2123
|
-
*
|
|
2124
|
-
* This typically happens when current selection in a file changes, but can
|
|
2125
|
-
* also be triggered when file content changes.
|
|
2126
|
-
*/
|
|
2127
|
-
const Automatic: 2;
|
|
2128
|
-
}
|
|
2129
|
-
export type CodeActionTriggerKind = 1 | 2;
|
|
2130
|
-
/**
|
|
2131
|
-
* Contains additional diagnostic information about the context in which
|
|
2132
|
-
* a {@link CodeActionProvider.provideCodeActions code action} is run.
|
|
2133
|
-
*/
|
|
2134
|
-
export interface CodeActionContext {
|
|
2135
|
-
/**
|
|
2136
|
-
* An array of diagnostics known on the client side overlapping the range provided to the
|
|
2137
|
-
* `textDocument/codeAction` request. They are provided so that the server knows which
|
|
2138
|
-
* errors are currently presented to the user for the given range. There is no guarantee
|
|
2139
|
-
* that these accurately reflect the error state of the resource. The primary parameter
|
|
2140
|
-
* to compute code actions is the provided range.
|
|
2141
|
-
*/
|
|
2142
|
-
diagnostics: Diagnostic[];
|
|
2143
|
-
/**
|
|
2144
|
-
* Requested kind of actions to return.
|
|
2145
|
-
*
|
|
2146
|
-
* Actions not of this kind are filtered out by the client before being shown. So servers
|
|
2147
|
-
* can omit computing them.
|
|
2148
|
-
*/
|
|
2149
|
-
only?: CodeActionKind[];
|
|
2150
|
-
/**
|
|
2151
|
-
* The reason why code actions were requested.
|
|
2152
|
-
*
|
|
2153
|
-
* @since 3.17.0
|
|
2154
|
-
*/
|
|
2155
|
-
triggerKind?: CodeActionTriggerKind;
|
|
2156
|
-
}
|
|
2157
|
-
/**
|
|
2158
|
-
* The CodeActionContext namespace provides helper functions to work with
|
|
2159
|
-
* {@link CodeActionContext} literals.
|
|
2160
|
-
*/
|
|
2161
|
-
export declare namespace CodeActionContext {
|
|
2162
|
-
/**
|
|
2163
|
-
* Creates a new CodeActionContext literal.
|
|
2164
|
-
*/
|
|
2165
|
-
function create(diagnostics: Diagnostic[], only?: CodeActionKind[], triggerKind?: CodeActionTriggerKind): CodeActionContext;
|
|
2166
|
-
/**
|
|
2167
|
-
* Checks whether the given literal conforms to the {@link CodeActionContext} interface.
|
|
2168
|
-
*/
|
|
2169
|
-
function is(value: any): value is CodeActionContext;
|
|
2170
|
-
}
|
|
2171
|
-
/**
|
|
2172
|
-
* A code action represents a change that can be performed in code, e.g. to fix a problem or
|
|
2173
|
-
* to refactor code.
|
|
2174
|
-
*
|
|
2175
|
-
* A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
|
|
2176
|
-
*/
|
|
2177
|
-
export interface CodeAction {
|
|
2178
|
-
/**
|
|
2179
|
-
* A short, human-readable, title for this code action.
|
|
2180
|
-
*/
|
|
2181
|
-
title: string;
|
|
2182
|
-
/**
|
|
2183
|
-
* The kind of the code action.
|
|
2184
|
-
*
|
|
2185
|
-
* Used to filter code actions.
|
|
2186
|
-
*/
|
|
2187
|
-
kind?: CodeActionKind;
|
|
2188
|
-
/**
|
|
2189
|
-
* The diagnostics that this code action resolves.
|
|
2190
|
-
*/
|
|
2191
|
-
diagnostics?: Diagnostic[];
|
|
2192
|
-
/**
|
|
2193
|
-
* Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
|
|
2194
|
-
* by keybindings.
|
|
2195
|
-
*
|
|
2196
|
-
* A quick fix should be marked preferred if it properly addresses the underlying error.
|
|
2197
|
-
* A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
|
|
2198
|
-
*
|
|
2199
|
-
* @since 3.15.0
|
|
2200
|
-
*/
|
|
2201
|
-
isPreferred?: boolean;
|
|
2202
|
-
/**
|
|
2203
|
-
* Marks that the code action cannot currently be applied.
|
|
2204
|
-
*
|
|
2205
|
-
* Clients should follow the following guidelines regarding disabled code actions:
|
|
2206
|
-
*
|
|
2207
|
-
* - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
|
|
2208
|
-
* code action menus.
|
|
2209
|
-
*
|
|
2210
|
-
* - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type
|
|
2211
|
-
* of code action, such as refactorings.
|
|
2212
|
-
*
|
|
2213
|
-
* - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
|
|
2214
|
-
* that auto applies a code action and only disabled code actions are returned, the client should show the user an
|
|
2215
|
-
* error message with `reason` in the editor.
|
|
2216
|
-
*
|
|
2217
|
-
* @since 3.16.0
|
|
2218
|
-
*/
|
|
2219
|
-
disabled?: {
|
|
2220
|
-
/**
|
|
2221
|
-
* Human readable description of why the code action is currently disabled.
|
|
2222
|
-
*
|
|
2223
|
-
* This is displayed in the code actions UI.
|
|
2224
|
-
*/
|
|
2225
|
-
reason: string;
|
|
2226
|
-
};
|
|
2227
|
-
/**
|
|
2228
|
-
* The workspace edit this code action performs.
|
|
2229
|
-
*/
|
|
2230
|
-
edit?: WorkspaceEdit;
|
|
2231
|
-
/**
|
|
2232
|
-
* A command this code action executes. If a code action
|
|
2233
|
-
* provides an edit and a command, first the edit is
|
|
2234
|
-
* executed and then the command.
|
|
2235
|
-
*/
|
|
2236
|
-
command?: Command;
|
|
2237
|
-
/**
|
|
2238
|
-
* A data entry field that is preserved on a code action between
|
|
2239
|
-
* a `textDocument/codeAction` and a `codeAction/resolve` request.
|
|
2240
|
-
*
|
|
2241
|
-
* @since 3.16.0
|
|
2242
|
-
*/
|
|
2243
|
-
data?: LSPAny;
|
|
2244
|
-
}
|
|
2245
|
-
export declare namespace CodeAction {
|
|
2246
|
-
/**
|
|
2247
|
-
* Creates a new code action.
|
|
2248
|
-
*
|
|
2249
|
-
* @param title The title of the code action.
|
|
2250
|
-
* @param kind The kind of the code action.
|
|
2251
|
-
*/
|
|
2252
|
-
function create(title: string, kind?: CodeActionKind): CodeAction;
|
|
2253
|
-
/**
|
|
2254
|
-
* Creates a new code action.
|
|
2255
|
-
*
|
|
2256
|
-
* @param title The title of the code action.
|
|
2257
|
-
* @param command The command to execute.
|
|
2258
|
-
* @param kind The kind of the code action.
|
|
2259
|
-
*/
|
|
2260
|
-
function create(title: string, command: Command, kind?: CodeActionKind): CodeAction;
|
|
2261
|
-
/**
|
|
2262
|
-
* Creates a new code action.
|
|
2263
|
-
*
|
|
2264
|
-
* @param title The title of the code action.
|
|
2265
|
-
* @param edit The edit to perform.
|
|
2266
|
-
* @param kind The kind of the code action.
|
|
2267
|
-
*/
|
|
2268
|
-
function create(title: string, edit: WorkspaceEdit, kind?: CodeActionKind): CodeAction;
|
|
2269
|
-
function is(value: any): value is CodeAction;
|
|
2270
|
-
}
|
|
2271
|
-
/**
|
|
2272
|
-
* A code lens represents a {@link Command command} that should be shown along with
|
|
2273
|
-
* source text, like the number of references, a way to run tests, etc.
|
|
2274
|
-
*
|
|
2275
|
-
* A code lens is _unresolved_ when no command is associated to it. For performance
|
|
2276
|
-
* reasons the creation of a code lens and resolving should be done in two stages.
|
|
2277
|
-
*/
|
|
2278
|
-
export interface CodeLens {
|
|
2279
|
-
/**
|
|
2280
|
-
* The range in which this code lens is valid. Should only span a single line.
|
|
2281
|
-
*/
|
|
2282
|
-
range: Range;
|
|
2283
|
-
/**
|
|
2284
|
-
* The command this code lens represents.
|
|
2285
|
-
*/
|
|
2286
|
-
command?: Command;
|
|
2287
|
-
/**
|
|
2288
|
-
* A data entry field that is preserved on a code lens item between
|
|
2289
|
-
* a {@link CodeLensRequest} and a {@link CodeLensResolveRequest}
|
|
2290
|
-
*/
|
|
2291
|
-
data?: LSPAny;
|
|
2292
|
-
}
|
|
2293
|
-
/**
|
|
2294
|
-
* The CodeLens namespace provides helper functions to work with
|
|
2295
|
-
* {@link CodeLens} literals.
|
|
2296
|
-
*/
|
|
2297
|
-
export declare namespace CodeLens {
|
|
2298
|
-
/**
|
|
2299
|
-
* Creates a new CodeLens literal.
|
|
2300
|
-
*/
|
|
2301
|
-
function create(range: Range, data?: LSPAny): CodeLens;
|
|
2302
|
-
/**
|
|
2303
|
-
* Checks whether the given literal conforms to the {@link CodeLens} interface.
|
|
2304
|
-
*/
|
|
2305
|
-
function is(value: any): value is CodeLens;
|
|
2306
|
-
}
|
|
2307
|
-
/**
|
|
2308
|
-
* Value-object describing what options formatting should use.
|
|
2309
|
-
*/
|
|
2310
|
-
export interface FormattingOptions {
|
|
2311
|
-
/**
|
|
2312
|
-
* Size of a tab in spaces.
|
|
2313
|
-
*/
|
|
2314
|
-
tabSize: uinteger;
|
|
2315
|
-
/**
|
|
2316
|
-
* Prefer spaces over tabs.
|
|
2317
|
-
*/
|
|
2318
|
-
insertSpaces: boolean;
|
|
2319
|
-
/**
|
|
2320
|
-
* Trim trailing whitespace on a line.
|
|
2321
|
-
*
|
|
2322
|
-
* @since 3.15.0
|
|
2323
|
-
*/
|
|
2324
|
-
trimTrailingWhitespace?: boolean;
|
|
2325
|
-
/**
|
|
2326
|
-
* Insert a newline character at the end of the file if one does not exist.
|
|
2327
|
-
*
|
|
2328
|
-
* @since 3.15.0
|
|
2329
|
-
*/
|
|
2330
|
-
insertFinalNewline?: boolean;
|
|
2331
|
-
/**
|
|
2332
|
-
* Trim all newlines after the final newline at the end of the file.
|
|
2333
|
-
*
|
|
2334
|
-
* @since 3.15.0
|
|
2335
|
-
*/
|
|
2336
|
-
trimFinalNewlines?: boolean;
|
|
2337
|
-
/**
|
|
2338
|
-
* Signature for further properties.
|
|
2339
|
-
*/
|
|
2340
|
-
[key: string]: boolean | integer | string | undefined;
|
|
2341
|
-
}
|
|
2342
|
-
/**
|
|
2343
|
-
* The FormattingOptions namespace provides helper functions to work with
|
|
2344
|
-
* {@link FormattingOptions} literals.
|
|
2345
|
-
*/
|
|
2346
|
-
export declare namespace FormattingOptions {
|
|
2347
|
-
/**
|
|
2348
|
-
* Creates a new FormattingOptions literal.
|
|
2349
|
-
*/
|
|
2350
|
-
function create(tabSize: uinteger, insertSpaces: boolean): FormattingOptions;
|
|
2351
|
-
/**
|
|
2352
|
-
* Checks whether the given literal conforms to the {@link FormattingOptions} interface.
|
|
2353
|
-
*/
|
|
2354
|
-
function is(value: any): value is FormattingOptions;
|
|
2355
|
-
}
|
|
2356
|
-
/**
|
|
2357
|
-
* A document link is a range in a text document that links to an internal or external resource, like another
|
|
2358
|
-
* text document or a web site.
|
|
2359
|
-
*/
|
|
2360
|
-
export interface DocumentLink {
|
|
2361
|
-
/**
|
|
2362
|
-
* The range this link applies to.
|
|
2363
|
-
*/
|
|
2364
|
-
range: Range;
|
|
2365
|
-
/**
|
|
2366
|
-
* The uri this link points to. If missing a resolve request is sent later.
|
|
2367
|
-
*/
|
|
2368
|
-
target?: URI;
|
|
2369
|
-
/**
|
|
2370
|
-
* The tooltip text when you hover over this link.
|
|
2371
|
-
*
|
|
2372
|
-
* If a tooltip is provided, is will be displayed in a string that includes instructions on how to
|
|
2373
|
-
* trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
|
|
2374
|
-
* user settings, and localization.
|
|
2375
|
-
*
|
|
2376
|
-
* @since 3.15.0
|
|
2377
|
-
*/
|
|
2378
|
-
tooltip?: string;
|
|
2379
|
-
/**
|
|
2380
|
-
* A data entry field that is preserved on a document link between a
|
|
2381
|
-
* DocumentLinkRequest and a DocumentLinkResolveRequest.
|
|
2382
|
-
*/
|
|
2383
|
-
data?: LSPAny;
|
|
2384
|
-
}
|
|
2385
|
-
/**
|
|
2386
|
-
* The DocumentLink namespace provides helper functions to work with
|
|
2387
|
-
* {@link DocumentLink} literals.
|
|
2388
|
-
*/
|
|
2389
|
-
export declare namespace DocumentLink {
|
|
2390
|
-
/**
|
|
2391
|
-
* Creates a new DocumentLink literal.
|
|
2392
|
-
*/
|
|
2393
|
-
function create(range: Range, target?: string, data?: LSPAny): DocumentLink;
|
|
2394
|
-
/**
|
|
2395
|
-
* Checks whether the given literal conforms to the {@link DocumentLink} interface.
|
|
2396
|
-
*/
|
|
2397
|
-
function is(value: any): value is DocumentLink;
|
|
2398
|
-
}
|
|
2399
|
-
/**
|
|
2400
|
-
* A selection range represents a part of a selection hierarchy. A selection range
|
|
2401
|
-
* may have a parent selection range that contains it.
|
|
2402
|
-
*/
|
|
2403
|
-
export interface SelectionRange {
|
|
2404
|
-
/**
|
|
2405
|
-
* The {@link Range range} of this selection range.
|
|
2406
|
-
*/
|
|
2407
|
-
range: Range;
|
|
2408
|
-
/**
|
|
2409
|
-
* The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
|
|
2410
|
-
*/
|
|
2411
|
-
parent?: SelectionRange;
|
|
2412
|
-
}
|
|
2413
|
-
/**
|
|
2414
|
-
* The SelectionRange namespace provides helper function to work with
|
|
2415
|
-
* SelectionRange literals.
|
|
2416
|
-
*/
|
|
2417
|
-
export declare namespace SelectionRange {
|
|
2418
|
-
/**
|
|
2419
|
-
* Creates a new SelectionRange
|
|
2420
|
-
* @param range the range.
|
|
2421
|
-
* @param parent an optional parent.
|
|
2422
|
-
*/
|
|
2423
|
-
function create(range: Range, parent?: SelectionRange): SelectionRange;
|
|
2424
|
-
function is(value: any): value is SelectionRange;
|
|
2425
|
-
}
|
|
2426
|
-
/**
|
|
2427
|
-
* Represents programming constructs like functions or constructors in the context
|
|
2428
|
-
* of call hierarchy.
|
|
2429
|
-
*
|
|
2430
|
-
* @since 3.16.0
|
|
2431
|
-
*/
|
|
2432
|
-
export interface CallHierarchyItem {
|
|
2433
|
-
/**
|
|
2434
|
-
* The name of this item.
|
|
2435
|
-
*/
|
|
2436
|
-
name: string;
|
|
2437
|
-
/**
|
|
2438
|
-
* The kind of this item.
|
|
2439
|
-
*/
|
|
2440
|
-
kind: SymbolKind;
|
|
2441
|
-
/**
|
|
2442
|
-
* Tags for this item.
|
|
2443
|
-
*/
|
|
2444
|
-
tags?: SymbolTag[];
|
|
2445
|
-
/**
|
|
2446
|
-
* More detail for this item, e.g. the signature of a function.
|
|
2447
|
-
*/
|
|
2448
|
-
detail?: string;
|
|
2449
|
-
/**
|
|
2450
|
-
* The resource identifier of this item.
|
|
2451
|
-
*/
|
|
2452
|
-
uri: DocumentUri;
|
|
2453
|
-
/**
|
|
2454
|
-
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
|
|
2455
|
-
*/
|
|
2456
|
-
range: Range;
|
|
2457
|
-
/**
|
|
2458
|
-
* The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
|
|
2459
|
-
* Must be contained by the {@link CallHierarchyItem.range `range`}.
|
|
2460
|
-
*/
|
|
2461
|
-
selectionRange: Range;
|
|
2462
|
-
/**
|
|
2463
|
-
* A data entry field that is preserved between a call hierarchy prepare and
|
|
2464
|
-
* incoming calls or outgoing calls requests.
|
|
2465
|
-
*/
|
|
2466
|
-
data?: LSPAny;
|
|
2467
|
-
}
|
|
2468
|
-
/**
|
|
2469
|
-
* Represents an incoming call, e.g. a caller of a method or constructor.
|
|
2470
|
-
*
|
|
2471
|
-
* @since 3.16.0
|
|
2472
|
-
*/
|
|
2473
|
-
export interface CallHierarchyIncomingCall {
|
|
2474
|
-
/**
|
|
2475
|
-
* The item that makes the call.
|
|
2476
|
-
*/
|
|
2477
|
-
from: CallHierarchyItem;
|
|
2478
|
-
/**
|
|
2479
|
-
* The ranges at which the calls appear. This is relative to the caller
|
|
2480
|
-
* denoted by {@link CallHierarchyIncomingCall.from `this.from`}.
|
|
2481
|
-
*/
|
|
2482
|
-
fromRanges: Range[];
|
|
2483
|
-
}
|
|
2484
|
-
/**
|
|
2485
|
-
* Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
|
|
2486
|
-
*
|
|
2487
|
-
* @since 3.16.0
|
|
2488
|
-
*/
|
|
2489
|
-
export interface CallHierarchyOutgoingCall {
|
|
2490
|
-
/**
|
|
2491
|
-
* The item that is called.
|
|
2492
|
-
*/
|
|
2493
|
-
to: CallHierarchyItem;
|
|
2494
|
-
/**
|
|
2495
|
-
* The range at which this item is called. This is the range relative to the caller, e.g the item
|
|
2496
|
-
* passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`}
|
|
2497
|
-
* and not {@link CallHierarchyOutgoingCall.to `this.to`}.
|
|
2498
|
-
*/
|
|
2499
|
-
fromRanges: Range[];
|
|
2500
|
-
}
|
|
2501
|
-
/**
|
|
2502
|
-
* A set of predefined token types. This set is not fixed
|
|
2503
|
-
* an clients can specify additional token types via the
|
|
2504
|
-
* corresponding client capabilities.
|
|
2505
|
-
*
|
|
2506
|
-
* @since 3.16.0
|
|
2507
|
-
*/
|
|
2508
|
-
export declare enum SemanticTokenTypes {
|
|
2509
|
-
namespace = "namespace",
|
|
2510
|
-
/**
|
|
2511
|
-
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
2512
|
-
* a specific type like class or enum.
|
|
2513
|
-
*/
|
|
2514
|
-
type = "type",
|
|
2515
|
-
class = "class",
|
|
2516
|
-
enum = "enum",
|
|
2517
|
-
interface = "interface",
|
|
2518
|
-
struct = "struct",
|
|
2519
|
-
typeParameter = "typeParameter",
|
|
2520
|
-
parameter = "parameter",
|
|
2521
|
-
variable = "variable",
|
|
2522
|
-
property = "property",
|
|
2523
|
-
enumMember = "enumMember",
|
|
2524
|
-
event = "event",
|
|
2525
|
-
function = "function",
|
|
2526
|
-
method = "method",
|
|
2527
|
-
macro = "macro",
|
|
2528
|
-
keyword = "keyword",
|
|
2529
|
-
modifier = "modifier",
|
|
2530
|
-
comment = "comment",
|
|
2531
|
-
string = "string",
|
|
2532
|
-
number = "number",
|
|
2533
|
-
regexp = "regexp",
|
|
2534
|
-
operator = "operator",
|
|
2535
|
-
/**
|
|
2536
|
-
* @since 3.17.0
|
|
2537
|
-
*/
|
|
2538
|
-
decorator = "decorator"
|
|
2539
|
-
}
|
|
2540
|
-
/**
|
|
2541
|
-
* A set of predefined token modifiers. This set is not fixed
|
|
2542
|
-
* an clients can specify additional token types via the
|
|
2543
|
-
* corresponding client capabilities.
|
|
2544
|
-
*
|
|
2545
|
-
* @since 3.16.0
|
|
2546
|
-
*/
|
|
2547
|
-
export declare enum SemanticTokenModifiers {
|
|
2548
|
-
declaration = "declaration",
|
|
2549
|
-
definition = "definition",
|
|
2550
|
-
readonly = "readonly",
|
|
2551
|
-
static = "static",
|
|
2552
|
-
deprecated = "deprecated",
|
|
2553
|
-
abstract = "abstract",
|
|
2554
|
-
async = "async",
|
|
2555
|
-
modification = "modification",
|
|
2556
|
-
documentation = "documentation",
|
|
2557
|
-
defaultLibrary = "defaultLibrary"
|
|
2558
|
-
}
|
|
2559
|
-
/**
|
|
2560
|
-
* @since 3.16.0
|
|
2561
|
-
*/
|
|
2562
|
-
export interface SemanticTokensLegend {
|
|
2563
|
-
/**
|
|
2564
|
-
* The token types a server uses.
|
|
2565
|
-
*/
|
|
2566
|
-
tokenTypes: string[];
|
|
2567
|
-
/**
|
|
2568
|
-
* The token modifiers a server uses.
|
|
2569
|
-
*/
|
|
2570
|
-
tokenModifiers: string[];
|
|
2571
|
-
}
|
|
2572
|
-
/**
|
|
2573
|
-
* @since 3.16.0
|
|
2574
|
-
*/
|
|
2575
|
-
export interface SemanticTokens {
|
|
2576
|
-
/**
|
|
2577
|
-
* An optional result id. If provided and clients support delta updating
|
|
2578
|
-
* the client will include the result id in the next semantic token request.
|
|
2579
|
-
* A server can then instead of computing all semantic tokens again simply
|
|
2580
|
-
* send a delta.
|
|
2581
|
-
*/
|
|
2582
|
-
resultId?: string;
|
|
2583
|
-
/**
|
|
2584
|
-
* The actual tokens.
|
|
2585
|
-
*/
|
|
2586
|
-
data: uinteger[];
|
|
2587
|
-
}
|
|
2588
|
-
/**
|
|
2589
|
-
* @since 3.16.0
|
|
2590
|
-
*/
|
|
2591
|
-
export declare namespace SemanticTokens {
|
|
2592
|
-
function is(value: any): value is SemanticTokens;
|
|
2593
|
-
}
|
|
2594
|
-
/**
|
|
2595
|
-
* @since 3.16.0
|
|
2596
|
-
*/
|
|
2597
|
-
export interface SemanticTokensEdit {
|
|
2598
|
-
/**
|
|
2599
|
-
* The start offset of the edit.
|
|
2600
|
-
*/
|
|
2601
|
-
start: uinteger;
|
|
2602
|
-
/**
|
|
2603
|
-
* The count of elements to remove.
|
|
2604
|
-
*/
|
|
2605
|
-
deleteCount: uinteger;
|
|
2606
|
-
/**
|
|
2607
|
-
* The elements to insert.
|
|
2608
|
-
*/
|
|
2609
|
-
data?: uinteger[];
|
|
2610
|
-
}
|
|
2611
|
-
/**
|
|
2612
|
-
* @since 3.16.0
|
|
2613
|
-
*/
|
|
2614
|
-
export interface SemanticTokensDelta {
|
|
2615
|
-
readonly resultId?: string;
|
|
2616
|
-
/**
|
|
2617
|
-
* The semantic token edits to transform a previous result into a new result.
|
|
2618
|
-
*/
|
|
2619
|
-
edits: SemanticTokensEdit[];
|
|
2620
|
-
}
|
|
2621
|
-
/**
|
|
2622
|
-
* @since 3.17.0
|
|
2623
|
-
*/
|
|
2624
|
-
export type TypeHierarchyItem = {
|
|
2625
|
-
/**
|
|
2626
|
-
* The name of this item.
|
|
2627
|
-
*/
|
|
2628
|
-
name: string;
|
|
2629
|
-
/**
|
|
2630
|
-
* The kind of this item.
|
|
2631
|
-
*/
|
|
2632
|
-
kind: SymbolKind;
|
|
2633
|
-
/**
|
|
2634
|
-
* Tags for this item.
|
|
2635
|
-
*/
|
|
2636
|
-
tags?: SymbolTag[];
|
|
2637
|
-
/**
|
|
2638
|
-
* More detail for this item, e.g. the signature of a function.
|
|
2639
|
-
*/
|
|
2640
|
-
detail?: string;
|
|
2641
|
-
/**
|
|
2642
|
-
* The resource identifier of this item.
|
|
2643
|
-
*/
|
|
2644
|
-
uri: DocumentUri;
|
|
2645
|
-
/**
|
|
2646
|
-
* The range enclosing this symbol not including leading/trailing whitespace
|
|
2647
|
-
* but everything else, e.g. comments and code.
|
|
2648
|
-
*/
|
|
2649
|
-
range: Range;
|
|
2650
|
-
/**
|
|
2651
|
-
* The range that should be selected and revealed when this symbol is being
|
|
2652
|
-
* picked, e.g. the name of a function. Must be contained by the
|
|
2653
|
-
* {@link TypeHierarchyItem.range `range`}.
|
|
2654
|
-
*/
|
|
2655
|
-
selectionRange: Range;
|
|
2656
|
-
/**
|
|
2657
|
-
* A data entry field that is preserved between a type hierarchy prepare and
|
|
2658
|
-
* supertypes or subtypes requests. It could also be used to identify the
|
|
2659
|
-
* type hierarchy in the server, helping improve the performance on
|
|
2660
|
-
* resolving supertypes and subtypes.
|
|
2661
|
-
*/
|
|
2662
|
-
data?: LSPAny;
|
|
2663
|
-
};
|
|
2664
|
-
/**
|
|
2665
|
-
* Provide inline value as text.
|
|
2666
|
-
*
|
|
2667
|
-
* @since 3.17.0
|
|
2668
|
-
*/
|
|
2669
|
-
export type InlineValueText = {
|
|
2670
|
-
/**
|
|
2671
|
-
* The document range for which the inline value applies.
|
|
2672
|
-
*/
|
|
2673
|
-
range: Range;
|
|
2674
|
-
/**
|
|
2675
|
-
* The text of the inline value.
|
|
2676
|
-
*/
|
|
2677
|
-
text: string;
|
|
2678
|
-
};
|
|
2679
|
-
/**
|
|
2680
|
-
* The InlineValueText namespace provides functions to deal with InlineValueTexts.
|
|
2681
|
-
*
|
|
2682
|
-
* @since 3.17.0
|
|
2683
|
-
*/
|
|
2684
|
-
export declare namespace InlineValueText {
|
|
2685
|
-
/**
|
|
2686
|
-
* Creates a new InlineValueText literal.
|
|
2687
|
-
*/
|
|
2688
|
-
function create(range: Range, text: string): InlineValueText;
|
|
2689
|
-
function is(value: InlineValue | undefined | null): value is InlineValueText;
|
|
2690
|
-
}
|
|
2691
|
-
/**
|
|
2692
|
-
* Provide inline value through a variable lookup.
|
|
2693
|
-
* If only a range is specified, the variable name will be extracted from the underlying document.
|
|
2694
|
-
* An optional variable name can be used to override the extracted name.
|
|
2695
|
-
*
|
|
2696
|
-
* @since 3.17.0
|
|
2697
|
-
*/
|
|
2698
|
-
export type InlineValueVariableLookup = {
|
|
2699
|
-
/**
|
|
2700
|
-
* The document range for which the inline value applies.
|
|
2701
|
-
* The range is used to extract the variable name from the underlying document.
|
|
2702
|
-
*/
|
|
2703
|
-
range: Range;
|
|
2704
|
-
/**
|
|
2705
|
-
* If specified the name of the variable to look up.
|
|
2706
|
-
*/
|
|
2707
|
-
variableName?: string;
|
|
2708
|
-
/**
|
|
2709
|
-
* How to perform the lookup.
|
|
2710
|
-
*/
|
|
2711
|
-
caseSensitiveLookup: boolean;
|
|
2712
|
-
};
|
|
2713
|
-
/**
|
|
2714
|
-
* The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
|
|
2715
|
-
*
|
|
2716
|
-
* @since 3.17.0
|
|
2717
|
-
*/
|
|
2718
|
-
export declare namespace InlineValueVariableLookup {
|
|
2719
|
-
/**
|
|
2720
|
-
* Creates a new InlineValueText literal.
|
|
2721
|
-
*/
|
|
2722
|
-
function create(range: Range, variableName: string | undefined, caseSensitiveLookup: boolean): InlineValueVariableLookup;
|
|
2723
|
-
function is(value: InlineValue | undefined | null): value is InlineValueVariableLookup;
|
|
2724
|
-
}
|
|
2725
|
-
/**
|
|
2726
|
-
* Provide an inline value through an expression evaluation.
|
|
2727
|
-
* If only a range is specified, the expression will be extracted from the underlying document.
|
|
2728
|
-
* An optional expression can be used to override the extracted expression.
|
|
2729
|
-
*
|
|
2730
|
-
* @since 3.17.0
|
|
2731
|
-
*/
|
|
2732
|
-
export type InlineValueEvaluatableExpression = {
|
|
2733
|
-
/**
|
|
2734
|
-
* The document range for which the inline value applies.
|
|
2735
|
-
* The range is used to extract the evaluatable expression from the underlying document.
|
|
2736
|
-
*/
|
|
2737
|
-
range: Range;
|
|
2738
|
-
/**
|
|
2739
|
-
* If specified the expression overrides the extracted expression.
|
|
2740
|
-
*/
|
|
2741
|
-
expression?: string;
|
|
2742
|
-
};
|
|
2743
|
-
/**
|
|
2744
|
-
* The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
|
|
2745
|
-
*
|
|
2746
|
-
* @since 3.17.0
|
|
2747
|
-
*/
|
|
2748
|
-
export declare namespace InlineValueEvaluatableExpression {
|
|
2749
|
-
/**
|
|
2750
|
-
* Creates a new InlineValueEvaluatableExpression literal.
|
|
2751
|
-
*/
|
|
2752
|
-
function create(range: Range, expression: string | undefined): InlineValueEvaluatableExpression;
|
|
2753
|
-
function is(value: InlineValue | undefined | null): value is InlineValueEvaluatableExpression;
|
|
2754
|
-
}
|
|
2755
|
-
/**
|
|
2756
|
-
* Inline value information can be provided by different means:
|
|
2757
|
-
* - directly as a text value (class InlineValueText).
|
|
2758
|
-
* - as a name to use for a variable lookup (class InlineValueVariableLookup)
|
|
2759
|
-
* - as an evaluatable expression (class InlineValueEvaluatableExpression)
|
|
2760
|
-
* The InlineValue types combines all inline value types into one type.
|
|
2761
|
-
*
|
|
2762
|
-
* @since 3.17.0
|
|
2763
|
-
*/
|
|
2764
|
-
export type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueEvaluatableExpression;
|
|
2765
|
-
/**
|
|
2766
|
-
* @since 3.17.0
|
|
2767
|
-
*/
|
|
2768
|
-
export type InlineValueContext = {
|
|
2769
|
-
/**
|
|
2770
|
-
* The stack frame (as a DAP Id) where the execution has stopped.
|
|
2771
|
-
*/
|
|
2772
|
-
frameId: integer;
|
|
2773
|
-
/**
|
|
2774
|
-
* The document range where execution has stopped.
|
|
2775
|
-
* Typically the end position of the range denotes the line where the inline values are shown.
|
|
2776
|
-
*/
|
|
2777
|
-
stoppedLocation: Range;
|
|
2778
|
-
};
|
|
2779
|
-
/**
|
|
2780
|
-
* The InlineValueContext namespace provides helper functions to work with
|
|
2781
|
-
* {@link InlineValueContext} literals.
|
|
2782
|
-
*
|
|
2783
|
-
* @since 3.17.0
|
|
2784
|
-
*/
|
|
2785
|
-
export declare namespace InlineValueContext {
|
|
2786
|
-
/**
|
|
2787
|
-
* Creates a new InlineValueContext literal.
|
|
2788
|
-
*/
|
|
2789
|
-
function create(frameId: integer, stoppedLocation: Range): InlineValueContext;
|
|
2790
|
-
/**
|
|
2791
|
-
* Checks whether the given literal conforms to the {@link InlineValueContext} interface.
|
|
2792
|
-
*/
|
|
2793
|
-
function is(value: any): value is InlineValueContext;
|
|
2794
|
-
}
|
|
2795
|
-
/**
|
|
2796
|
-
* Inlay hint kinds.
|
|
2797
|
-
*
|
|
2798
|
-
* @since 3.17.0
|
|
2799
|
-
*/
|
|
2800
|
-
export declare namespace InlayHintKind {
|
|
2801
|
-
/**
|
|
2802
|
-
* An inlay hint that for a type annotation.
|
|
2803
|
-
*/
|
|
2804
|
-
const Type = 1;
|
|
2805
|
-
/**
|
|
2806
|
-
* An inlay hint that is for a parameter.
|
|
2807
|
-
*/
|
|
2808
|
-
const Parameter = 2;
|
|
2809
|
-
function is(value: number): value is InlayHintKind;
|
|
2810
|
-
}
|
|
2811
|
-
export type InlayHintKind = 1 | 2;
|
|
2812
|
-
/**
|
|
2813
|
-
* An inlay hint label part allows for interactive and composite labels
|
|
2814
|
-
* of inlay hints.
|
|
2815
|
-
*
|
|
2816
|
-
* @since 3.17.0
|
|
2817
|
-
*/
|
|
2818
|
-
export type InlayHintLabelPart = {
|
|
2819
|
-
/**
|
|
2820
|
-
* The value of this label part.
|
|
2821
|
-
*/
|
|
2822
|
-
value: string;
|
|
2823
|
-
/**
|
|
2824
|
-
* The tooltip text when you hover over this label part. Depending on
|
|
2825
|
-
* the client capability `inlayHint.resolveSupport` clients might resolve
|
|
2826
|
-
* this property late using the resolve request.
|
|
2827
|
-
*/
|
|
2828
|
-
tooltip?: string | MarkupContent;
|
|
2829
|
-
/**
|
|
2830
|
-
* An optional source code location that represents this
|
|
2831
|
-
* label part.
|
|
2832
|
-
*
|
|
2833
|
-
* The editor will use this location for the hover and for code navigation
|
|
2834
|
-
* features: This part will become a clickable link that resolves to the
|
|
2835
|
-
* definition of the symbol at the given location (not necessarily the
|
|
2836
|
-
* location itself), it shows the hover that shows at the given location,
|
|
2837
|
-
* and it shows a context menu with further code navigation commands.
|
|
2838
|
-
*
|
|
2839
|
-
* Depending on the client capability `inlayHint.resolveSupport` clients
|
|
2840
|
-
* might resolve this property late using the resolve request.
|
|
2841
|
-
*/
|
|
2842
|
-
location?: Location;
|
|
2843
|
-
/**
|
|
2844
|
-
* An optional command for this label part.
|
|
2845
|
-
*
|
|
2846
|
-
* Depending on the client capability `inlayHint.resolveSupport` clients
|
|
2847
|
-
* might resolve this property late using the resolve request.
|
|
2848
|
-
*/
|
|
2849
|
-
command?: Command;
|
|
2850
|
-
};
|
|
2851
|
-
export declare namespace InlayHintLabelPart {
|
|
2852
|
-
function create(value: string): InlayHintLabelPart;
|
|
2853
|
-
function is(value: any): value is InlayHintLabelPart;
|
|
2854
|
-
}
|
|
2855
|
-
/**
|
|
2856
|
-
* Inlay hint information.
|
|
2857
|
-
*
|
|
2858
|
-
* @since 3.17.0
|
|
2859
|
-
*/
|
|
2860
|
-
export type InlayHint = {
|
|
2861
|
-
/**
|
|
2862
|
-
* The position of this hint.
|
|
2863
|
-
*/
|
|
2864
|
-
position: Position;
|
|
2865
|
-
/**
|
|
2866
|
-
* The label of this hint. A human readable string or an array of
|
|
2867
|
-
* InlayHintLabelPart label parts.
|
|
2868
|
-
*
|
|
2869
|
-
* *Note* that neither the string nor the label part can be empty.
|
|
2870
|
-
*/
|
|
2871
|
-
label: string | InlayHintLabelPart[];
|
|
2872
|
-
/**
|
|
2873
|
-
* The kind of this hint. Can be omitted in which case the client
|
|
2874
|
-
* should fall back to a reasonable default.
|
|
2875
|
-
*/
|
|
2876
|
-
kind?: InlayHintKind;
|
|
2877
|
-
/**
|
|
2878
|
-
* Optional text edits that are performed when accepting this inlay hint.
|
|
2879
|
-
*
|
|
2880
|
-
* *Note* that edits are expected to change the document so that the inlay
|
|
2881
|
-
* hint (or its nearest variant) is now part of the document and the inlay
|
|
2882
|
-
* hint itself is now obsolete.
|
|
2883
|
-
*/
|
|
2884
|
-
textEdits?: TextEdit[];
|
|
2885
|
-
/**
|
|
2886
|
-
* The tooltip text when you hover over this item.
|
|
2887
|
-
*/
|
|
2888
|
-
tooltip?: string | MarkupContent;
|
|
2889
|
-
/**
|
|
2890
|
-
* Render padding before the hint.
|
|
2891
|
-
*
|
|
2892
|
-
* Note: Padding should use the editor's background color, not the
|
|
2893
|
-
* background color of the hint itself. That means padding can be used
|
|
2894
|
-
* to visually align/separate an inlay hint.
|
|
2895
|
-
*/
|
|
2896
|
-
paddingLeft?: boolean;
|
|
2897
|
-
/**
|
|
2898
|
-
* Render padding after the hint.
|
|
2899
|
-
*
|
|
2900
|
-
* Note: Padding should use the editor's background color, not the
|
|
2901
|
-
* background color of the hint itself. That means padding can be used
|
|
2902
|
-
* to visually align/separate an inlay hint.
|
|
2903
|
-
*/
|
|
2904
|
-
paddingRight?: boolean;
|
|
2905
|
-
/**
|
|
2906
|
-
* A data entry field that is preserved on an inlay hint between
|
|
2907
|
-
* a `textDocument/inlayHint` and a `inlayHint/resolve` request.
|
|
2908
|
-
*/
|
|
2909
|
-
data?: LSPAny;
|
|
2910
|
-
};
|
|
2911
|
-
export declare namespace InlayHint {
|
|
2912
|
-
function create(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind): InlayHint;
|
|
2913
|
-
function is(value: any): value is InlayHint;
|
|
2914
|
-
}
|
|
2915
|
-
/**
|
|
2916
|
-
* A string value used as a snippet is a template which allows to insert text
|
|
2917
|
-
* and to control the editor cursor when insertion happens.
|
|
2918
|
-
*
|
|
2919
|
-
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
2920
|
-
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
2921
|
-
* the end of the snippet. Variables are defined with `$name` and
|
|
2922
|
-
* `${name:default value}`.
|
|
2923
|
-
*
|
|
2924
|
-
* @since 3.18.0
|
|
2925
|
-
* @proposed
|
|
2926
|
-
*/
|
|
2927
|
-
export interface StringValue {
|
|
2928
|
-
/**
|
|
2929
|
-
* The kind of string value.
|
|
2930
|
-
*/
|
|
2931
|
-
kind: 'snippet';
|
|
2932
|
-
/**
|
|
2933
|
-
* The snippet string.
|
|
2934
|
-
*/
|
|
2935
|
-
value: string;
|
|
2936
|
-
}
|
|
2937
|
-
export declare namespace StringValue {
|
|
2938
|
-
function createSnippet(value: string): StringValue;
|
|
2939
|
-
}
|
|
2940
|
-
/**
|
|
2941
|
-
* An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.
|
|
2942
|
-
*
|
|
2943
|
-
* @since 3.18.0
|
|
2944
|
-
* @proposed
|
|
2945
|
-
*/
|
|
2946
|
-
export interface InlineCompletionItem {
|
|
2947
|
-
/**
|
|
2948
|
-
* The text to replace the range with. Must be set.
|
|
2949
|
-
*/
|
|
2950
|
-
insertText: string | StringValue;
|
|
2951
|
-
/**
|
|
2952
|
-
* A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used.
|
|
2953
|
-
*/
|
|
2954
|
-
filterText?: string;
|
|
2955
|
-
/**
|
|
2956
|
-
* The range to replace. Must begin and end on the same line.
|
|
2957
|
-
*/
|
|
2958
|
-
range?: Range;
|
|
2959
|
-
/**
|
|
2960
|
-
* An optional {@link Command} that is executed *after* inserting this completion.
|
|
2961
|
-
*/
|
|
2962
|
-
command?: Command;
|
|
2963
|
-
}
|
|
2964
|
-
export declare namespace InlineCompletionItem {
|
|
2965
|
-
function create(insertText: string | StringValue, filterText?: string, range?: Range, command?: Command): InlineCompletionItem;
|
|
2966
|
-
}
|
|
2967
|
-
/**
|
|
2968
|
-
* Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor.
|
|
2969
|
-
*
|
|
2970
|
-
* @since 3.18.0
|
|
2971
|
-
* @proposed
|
|
2972
|
-
*/
|
|
2973
|
-
export interface InlineCompletionList {
|
|
2974
|
-
/**
|
|
2975
|
-
* The inline completion items
|
|
2976
|
-
*/
|
|
2977
|
-
items: InlineCompletionItem[];
|
|
2978
|
-
}
|
|
2979
|
-
export declare namespace InlineCompletionList {
|
|
2980
|
-
function create(items: InlineCompletionItem[]): InlineCompletionList;
|
|
2981
|
-
}
|
|
2982
|
-
/**
|
|
2983
|
-
* Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
|
|
2984
|
-
*
|
|
2985
|
-
* @since 3.18.0
|
|
2986
|
-
* @proposed
|
|
2987
|
-
*/
|
|
2988
|
-
export declare namespace InlineCompletionTriggerKind {
|
|
2989
|
-
/**
|
|
2990
|
-
* Completion was triggered explicitly by a user gesture.
|
|
2991
|
-
*/
|
|
2992
|
-
const Invoked: 0;
|
|
2993
|
-
/**
|
|
2994
|
-
* Completion was triggered automatically while editing.
|
|
2995
|
-
*/
|
|
2996
|
-
const Automatic: 1;
|
|
2997
|
-
}
|
|
2998
|
-
export type InlineCompletionTriggerKind = 0 | 1;
|
|
2999
|
-
/**
|
|
3000
|
-
* Describes the currently selected completion item.
|
|
3001
|
-
*
|
|
3002
|
-
* @since 3.18.0
|
|
3003
|
-
* @proposed
|
|
3004
|
-
*/
|
|
3005
|
-
export interface SelectedCompletionInfo {
|
|
3006
|
-
/**
|
|
3007
|
-
* The range that will be replaced if this completion item is accepted.
|
|
3008
|
-
*/
|
|
3009
|
-
range: Range;
|
|
3010
|
-
/**
|
|
3011
|
-
* The text the range will be replaced with if this completion is accepted.
|
|
3012
|
-
*/
|
|
3013
|
-
text: string;
|
|
3014
|
-
}
|
|
3015
|
-
export declare namespace SelectedCompletionInfo {
|
|
3016
|
-
function create(range: Range, text: string): SelectedCompletionInfo;
|
|
3017
|
-
}
|
|
3018
|
-
/**
|
|
3019
|
-
* Provides information about the context in which an inline completion was requested.
|
|
3020
|
-
*
|
|
3021
|
-
* @since 3.18.0
|
|
3022
|
-
* @proposed
|
|
3023
|
-
*/
|
|
3024
|
-
export interface InlineCompletionContext {
|
|
3025
|
-
/**
|
|
3026
|
-
* Describes how the inline completion was triggered.
|
|
3027
|
-
*/
|
|
3028
|
-
triggerKind: InlineCompletionTriggerKind;
|
|
3029
|
-
/**
|
|
3030
|
-
* Provides information about the currently selected item in the autocomplete widget if it is visible.
|
|
3031
|
-
*/
|
|
3032
|
-
selectedCompletionInfo?: SelectedCompletionInfo;
|
|
3033
|
-
}
|
|
3034
|
-
export declare namespace InlineCompletionContext {
|
|
3035
|
-
function create(triggerKind: InlineCompletionTriggerKind, selectedCompletionInfo?: SelectedCompletionInfo): InlineCompletionContext;
|
|
3036
|
-
}
|
|
3037
|
-
/**
|
|
3038
|
-
* A workspace folder inside a client.
|
|
3039
|
-
*/
|
|
3040
|
-
export interface WorkspaceFolder {
|
|
3041
|
-
/**
|
|
3042
|
-
* The associated URI for this workspace folder.
|
|
3043
|
-
*/
|
|
3044
|
-
uri: URI;
|
|
3045
|
-
/**
|
|
3046
|
-
* The name of the workspace folder. Used to refer to this
|
|
3047
|
-
* workspace folder in the user interface.
|
|
3048
|
-
*/
|
|
3049
|
-
name: string;
|
|
3050
|
-
}
|
|
3051
|
-
export declare namespace WorkspaceFolder {
|
|
3052
|
-
function is(value: any): value is WorkspaceFolder;
|
|
3053
|
-
}
|
|
3054
|
-
export declare const EOL: string[];
|
|
3055
|
-
/**
|
|
3056
|
-
* A simple text document. Not to be implemented. The document keeps the content
|
|
3057
|
-
* as string.
|
|
3058
|
-
*
|
|
3059
|
-
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
3060
|
-
*/
|
|
3061
|
-
export interface TextDocument {
|
|
3062
|
-
/**
|
|
3063
|
-
* The associated URI for this document. Most documents have the __file__-scheme, indicating that they
|
|
3064
|
-
* represent files on disk. However, some documents may have other schemes indicating that they are not
|
|
3065
|
-
* available on disk.
|
|
3066
|
-
*
|
|
3067
|
-
* @readonly
|
|
3068
|
-
*/
|
|
3069
|
-
readonly uri: DocumentUri;
|
|
3070
|
-
/**
|
|
3071
|
-
* The identifier of the language associated with this document.
|
|
3072
|
-
*
|
|
3073
|
-
* @readonly
|
|
3074
|
-
*/
|
|
3075
|
-
readonly languageId: string;
|
|
3076
|
-
/**
|
|
3077
|
-
* The version number of this document (it will increase after each
|
|
3078
|
-
* change, including undo/redo).
|
|
3079
|
-
*
|
|
3080
|
-
* @readonly
|
|
3081
|
-
*/
|
|
3082
|
-
readonly version: integer;
|
|
3083
|
-
/**
|
|
3084
|
-
* Get the text of this document. A substring can be retrieved by
|
|
3085
|
-
* providing a range.
|
|
3086
|
-
*
|
|
3087
|
-
* @param range (optional) An range within the document to return.
|
|
3088
|
-
* If no range is passed, the full content is returned.
|
|
3089
|
-
* Invalid range positions are adjusted as described in {@link Position.line Position.line}
|
|
3090
|
-
* and {@link Position.character Position.character}.
|
|
3091
|
-
* If the start range position is greater than the end range position,
|
|
3092
|
-
* then the effect of getText is as if the two positions were swapped.
|
|
3093
|
-
|
|
3094
|
-
* @return The text of this document or a substring of the text if a
|
|
3095
|
-
* range is provided.
|
|
3096
|
-
*/
|
|
3097
|
-
getText(range?: Range): string;
|
|
3098
|
-
/**
|
|
3099
|
-
* Converts a zero-based offset to a position.
|
|
3100
|
-
*
|
|
3101
|
-
* @param offset A zero-based offset.
|
|
3102
|
-
* @return A valid {@link Position position}.
|
|
3103
|
-
*/
|
|
3104
|
-
positionAt(offset: uinteger): Position;
|
|
3105
|
-
/**
|
|
3106
|
-
* Converts the position to a zero-based offset.
|
|
3107
|
-
* Invalid positions are adjusted as described in {@link Position.line Position.line}
|
|
3108
|
-
* and {@link Position.character Position.character}.
|
|
3109
|
-
*
|
|
3110
|
-
* @param position A position.
|
|
3111
|
-
* @return A valid zero-based offset.
|
|
3112
|
-
*/
|
|
3113
|
-
offsetAt(position: Position): uinteger;
|
|
3114
|
-
/**
|
|
3115
|
-
* The number of lines in this document.
|
|
3116
|
-
*
|
|
3117
|
-
* @readonly
|
|
3118
|
-
*/
|
|
3119
|
-
readonly lineCount: uinteger;
|
|
3120
|
-
}
|
|
3121
|
-
/**
|
|
3122
|
-
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
3123
|
-
*/
|
|
3124
|
-
export declare namespace TextDocument {
|
|
3125
|
-
/**
|
|
3126
|
-
* Creates a new ITextDocument literal from the given uri and content.
|
|
3127
|
-
* @param uri The document's uri.
|
|
3128
|
-
* @param languageId The document's language Id.
|
|
3129
|
-
* @param version The document's version.
|
|
3130
|
-
* @param content The document's content.
|
|
3131
|
-
*/
|
|
3132
|
-
function create(uri: DocumentUri, languageId: string, version: integer, content: string): TextDocument;
|
|
3133
|
-
/**
|
|
3134
|
-
* Checks whether the given literal conforms to the {@link ITextDocument} interface.
|
|
3135
|
-
*/
|
|
3136
|
-
function is(value: any): value is TextDocument;
|
|
3137
|
-
function applyEdits(document: TextDocument, edits: TextEdit[]): string;
|
|
3138
|
-
}
|
|
3139
|
-
export {};
|