e4a830e9b7
3e344b17b7 Remove extrenuous file. (#113825) 36f9eaf1e7 Merge pull request #113596 from Ry0taK/release/1.52 e73a6b082c Create ryotak.txt ea3859d4ba Bump version number to 1.52.1 (#112659) 608dfc1363 Catch all localhost duplicates when forwarding a port (#112575) 8b5ece7c20 Merge pull request #112431 from microsoft/misolori/notebook-color-icons c11e9282d8 Merge pull request #112565 from microsoft/isidorn/enableBreakpointsFor 2b6973a35d debug: check for existence of enableBreakpointsFor.languageIds 374d05c17c Revert "debug: stop supporting enableBreakpointsFor" f93c8a0386 Fix notebook status bar icon colors (fixes #112323) 940b5f4bb5 chore: fix run-on values for snap build (#112245) dbbf7079b2 Make sure that tunnel information isn't set on desktop (#112228) 99edf4ff0f fix linux deb repo pointer (#112226) 91a50e3022 Set tunnel information for embedders (#112215) c6cb541539 Fix port forwarded nofication showing for the wrong port (#112160) 6caba06920 Merge pull request #112141 from microsoft/joh/fix/111913 cb971b8ffd Preserve whitespace in tree hover (#112133) e4af2d8ad6 disable proposed API checks on top-level getters 6f933020e8 Just set textContent for custom hover (#112075) d66e3740a4 Merge pull request #112054 from microsoft/connor4312/js-debug-1.52.2 b4ec131cff retry all cosmosdb ops (#112072) 5e585c5fb4 use proper repos for linux arm (#112026) 37c2de252e debug: bump js-debug bc13785d3d Retry createAsset sproc due to ECONNRESET (#112020) 559a78eaaa Mitigate #109728 (#112008) 62d6b82a6f Revert "build: create asset should still try to add asset" (#112009) 30e0c5784b fix #111898 (#111928) 532ba43c78 Remove console.log 39f33b588a wrap font faimly with quotes dc8ac78031 fix #111910. Avoid notebook save race condition. 97e4af4d20 Fixes #111899: Maintain compatibility for context keys like `vim.use<C-r>` acbe8f273e Only render `vscode-remote://` extensions as remote 9254ec3b28 fixes #111577 7413cc2493 yarn gulp vscode 528ca4c9ea fix duplicate imports 8e5a1da05e Update doc comment for resolveTreeItem Related to #111715 478c7b633f Make welcome buttons look better in wide pane Fixes #111744 d298a8d5d6 Fix timing issue with environment tunnels Fixes microsoft/vscode-remote-release#4112 7fcdba7fea Add heuristic for when to notify about forwarded port Fixes microsoft/vscode-remote-release#4133 2e3236827e suppress refactor preview from onWill-handler, workaround for https://github.com/microsoft/vscode/issues/111873 de3dd1383c Active indent lines do not render in High Contrast theme. Fixes #111137 8f410da37f Revert "fixes #110353" 6ed64df492 repl: font family 0c947cb4ee fixes #96264 6a1ad5b9b8 π code lens font fix 60bf040b98 workaround for https://github.com/microsoft/vscode/issues/111871, fixes https://github.com/microsoft/vscode/issues/111666 5e350b1b79 build: create asset should still try to add asset 7256c3ab26 π code lens font 6a58335d02 explorerViewer drop await c2f68baa78 search: fix handle empty results from ripgrep 63137db51c debug: fix auto attach not turning on if reselecting current state c70d984fa2 debug: bump js-debug ff66544ada Allow using upper case hex characters for color ff824f2776 Bump actions b617b725a0 update notebook execute kb shortcut tooltip for windows. 1aa26c3775 Fixes #105808 9d5c351c71 notebook list view scrollbar should be below cell toolbar 53eac52308 Fixes #111499 1c1c59fd0f Kill code processes after each integration test suite run (#111844) 39fb92c6c5 Remove redundant when clauses 62b119aa22 Fixes bad has implementation 370e092880 extJupyter 41eb987d09 add log for save/saveas 7b1154d447 update resolve time stats even if they are the same. 7ecce71a48 Fixes #110376 450ae69a33 Fix #111835 2964a69479 Fix #111798: Getting Started: capitalized "Editor" looks weird 061e84830d fixes #110775 a82ae0c9b7 Fix #108266 564ff91763 fixes #111832 95f6cfa0ae More π : adjust overall padding & sizing (refs #111753) ae93d48902 fixes #111583 15f38fe338 Fix ports view order in remote explorer Fixes #111830 a63786db23 Add paren, bracket, and brace to autoclosing pairs for make Fixes #89191 3c4bbf6da2 Fix ports view listener leak Same kind of cause as https://github.com/microsoft/vscode/issues/107903 Fixes #111772 6d222ba785 Fixes #97196: Clear out semantic tokens when there are no more providers 0447415697 Hide the editor's cursor when doing composition (fixes #106663) 79fb30f5b6 Fix resolveTreeItem called twice Fixes #111749 07333dec48 node-debug@1.44.15 87e43299ad update DAP to 1.43 09a7ad2ae7 fix raw timers telemetry event 4095701c70 Exclude endgame-plan issues from query 0ea221b325 fix query, remove commas 4f33022639 add verification query for issues from non-vscode team members c0ad6a56c0 Slightly darken list active bg on light theme (fixes #111750) 92192baf76 Bring content closer to center vertical when space permitting Ref #111753 f603b548c5 Polish getting started styles (#111774) af63e8263a Fix #111706: Getting started: images need alt text 2012817c0d Fix #111699: workbench.startupEditor setting not showing Getting Started tab 5215161c88 fixes #108712 5b121903fc Fix issue preventing cells from leaving "running" state Fix #110973 253844006a fix #111735. 1fc36c35bb remove extrenouus log fixes #111759 b122603b86 Fix comment decoration weirdness, fixes https://github.com/microsoft/vscode-pull-request-github/issues/2309 9d9ae54aa8 Add jpg to vscodeResources in order to bring gettingStarted images into the bundle 44dafcc840 Allow an `EncodedTokensProvider` to also provide a tokenize method a9100d686c Update verification notebook milestone 4884986dd6 tweak smart select test a2193cb827 fix #111714 efd8b0141e explorer: update creation labels acaecbdc86 fixes #111602 0db0fa8fc9 Prompt when hitting a different UndoRedoSrouce when undoing (#111640) 2b179bff4a Extract `_undo`, `_redo` 0ac5e95251 Fix #109644 df2c328e59 string literal does not work with status bar item [background] color (fix #111687) d758a74bf7 Merge pull request #110902 from Wscats/patch-5 d79110a329 Avoid layer breaker bbdbcd333b Update contextkey.ts 9cd45f96de fixes #111710 383dc83e7f Fix the standalone editor build 97646e138a workbench.tree.expandMode 49ef641300 fixes #111639 af29768f18 Fix #110844 e16d1f06d7 Add default URI if not provided in dialog API Fixes #111585 f2ae4927f9 update distro 980ef5cb52 Merge pull request #110846 from Wscats/patch-3 94dd681d16 more fixes for #95697 16ffa1deff Add GreaterEquals and SmallerEquals and fix implementations 65c70884c1 Fix #106989 763b155fe9 Fix #111574 51b1029e98 Check detected tunnels before auto forwarding Fixes microsoft/vscode-remote-release#4112 87538e9cea Merge remote-tracking branch 'origin/master' into pr/Wscats/110846 2ba6946272 fixes #111581 8d171e6492 Improve multiple lock files notification Fixes #111589 0be03ecc6d fixes #111693 5d591624ae add install in browser action 16e91f1011 fix https://github.com/microsoft/vscode/issues/111741 f622d7b6f1 fixes #111657 9a9c6b5557 Extra character in icon hover. Fixes #111681 b9b92e3152 Fix tree item not getting resolved after data change Fixes #111711 f4187f2202 fixes #111732 #111733 806eaddcbe Fix resolveTreeItem getting called too early Fixes #111613 0587f828d6 fixes #111617 399be0e564 fixes #111671 3730238647 fixes #111601 e024fd8b96 add cancel-option to continue bisect model dialog, https://github.com/microsoft/vscode/issues/111667 914b5633f5 fixes #111593 2388291cbc start extension bisect with all extensions disabled and stop early if problem reproduces, https://github.com/microsoft/vscode/issues/111672 a1e5a1a593 Small typo in notebook mime type icon description. Fixes #111674 6d4532c484 align continue bisect messages, https://github.com/microsoft/vscode/issues/111667 1cad5ab365 Prepend `vs/nls` to `workerMain.js` (fixes #111599) 00bbeb3973 Fixes #111649: Have the diff editor control `wordWrapOverride1` and the toggle word wrap action `wordWrapOverride2` such that they can function independently 8041440e5b linux: disable integration tests af848910f7 Merge pull request #111661 from dataleaky/master c44732014d windows - prefer to focus window where files open in 14bf080705 Keep Editors Open menu choice in the editor '...' menu should be a checked option (fix #111668) b2ef118857 window.restoreWindows: preserve description polish (fix #111607) c76a42acc6 Bad rendering of status bar item with error background color (fix #111618) 1e0094545c Merge branch 'master' into master d9ea0ced98 build: fix config 60f5e6ee9a build: disable exploration sync 647cecb29d build: exclude electron-11.x.y branch from continuous build 5e54da666c fix #111675 and #111673 9dba02c075 re #109594. b2c2c20fe7 fix #109626. 8fa61d9652 Fix a dependency URL a0aeb3a559 Update package.json 4d9277a23a Optimize autosave message when changing settings. Fixes #111648 c96643feab Fix #111598 0e8f9d143b Merge pull request #111541 from mdesrosiers/handle-find-widget-history-delayer-promise-rejection f89bb0d54a Tweak verification needed query c7e849f9be fix https://github.com/microsoft/vscode/issues/111604 af5c09a10c Remove console.log from hoverWidget Fixes #111609 3689660fcc Add descriptions for npm.packageManager options Fixes #111628 72cce5194c fixes #110511 f67050c029 Missing jsdoc in LinkedEditingRanges. Fixes #111590 e0f804f483 fixes #111496 55489fdd47 Move ports veiw into remote explorer by default 4ca1a30f5d Update distro commit 9395c9403b ignore already verified items d531b6dfe9 proxy - various login dialog fixes c5ffc57ee6 Get ready for ports view experiment 20bf09bc66 [linked editing] finalize LinkedEditingRangeProvider. Fixes #109923 ec2bcdbb57 #111573 also check for setting value type 6e7d1fa680 Fix #111573 bf21395291 column options in openWith-command can be undefined, fyi @mjbvz 3472159cb1 Merge pull request #111408 from microsoft/aeschli/notebookIcons 7536644522 Fixes #111569 648ed9f9d1 unblock build f019356d4d Revert "Make users save new file (#110330)" e3105b9453 Add jpg exclude to hygene bd627caa54 Add actual images for content e428ce2d26 Dont let product icon overflow 5a3c6cb697 Fix offcenter footer 35e9278e50 Fix scrolling on getting staarted 562f909902 Revert "fix: c++ exception in keytar module" b0fba33756 Styling tweaks to getting started 8baa2cdaaf Better shape images in getting started d95abcca66 Prevent error when reopening markdown preview. (#107205) (#111449) 1c4cc602c6 Fix merge conflict 8b59a9ce1a Focus on the content window for iframe based webviews b854c0bffd Make vscode.openWith a proper api command (#111006) 6062ebe318 Bump highlight.js in /extensions/markdown-language-features (#111262) 9e5f14c1bc Default strict null checks to off for implicit projects 304d3d7e36 Handle rejected promise in history delayer 18ecb87939 fix html yarn.lock b03cdca765 icon doc 15b05ff05a fix #108788. 68eaa95360 Bumps version of github-browser c358910b01 Fixes #110880 - sets useConfigOnly=true on commit 634fb13135 [css][html] update dependencies 8448b1680c [html] update dependencies c941749f5b Enable persistance of getting started ui state dceba9ebb7 [css][html] Option to disable MDN Reference popups only (without effecting other functionalities). For #97979 c6e90c5ea3 Update 'statusBarItem.errorBackground' default color token (refs #110214) ec13471816 [json] Inconsistency between files.insertFinalNewline and Format Document. Fixes #17359 d132d93aeb Register `DeleteInsideWord` as an editor action 0b97b6b160 [json] update dependencies 025952c4d5 Rename `editor.atomicSoftTabs` to `editor.stickyTabStops` bb33ef06bf Fix #99530 de36470f39 Fixes #110897: Always disable word wrapping in left hand side editor of inline diff 833231811f Define a label for `deleteInsideWord` 3fb2f6f976 chore: bump distro 47ce2a8d6d #111845 fix localization tests 155691d0be chore: bump electron@9.3.5 (#111530) 5c71b5425a Fix #111357 b548ac2211 more build fixes 6dfdbe24d9 update distro 8cb4a6907b support passing log level using query param ac165d7f97 bump cache salt 8c2a384efa π format file 858817eb3c Update description of `remote.autoForwardPorts` e7f19cf61a don't validate MessagePort inside iframe as safari seems to have trouble with that bf24f189f1 Clean up defaultFolderPath 9689508fa5 Run OSS Tool and make necessary updates 2afcea867a Use argparse 1.0.9 in npm extension 648090440f caching is HARD aa36c6211b move duplicated code into central place 2c5901053a spelling error in command name (fix #111455) f5fb75d829 fix tests 0f1492d6da chore - remove unneccessary non null assertions 8ce7356104 Fix defaultFolderPath so that userhome is correct 2890fd321f Fix #111485 a5a37240bc fixes #108001 eee332ba85 fix misuse of VSCODE_ARCH in builds 2018df47d8 support font features, like ligatures, in code lens, https://github.com/microsoft/vscode/issues/16038 b7211aa875 fixes #107651 9172ecfad8 π distro a4054cda6d update references viewlet, also no more proposed API usage required cedc2850ec Exclude testplan-item label f47aae014c Merge pull request #111441 from microsoft/ben/native-tests 673c1adcb0 fix layer breaker 1efcfbf242 api - fix exception in status bar ef2a900dec sandbox - add SH1 to HEX utility using crypto.subtle with fallback to our own solution fbf7566d39 tests - add test suite for native modules 7723f2548c Fix #109406 8ee75c19bb Escape more white space in appendText Fixes #110464 c5ab321020 fix https://github.com/microsoft/vscode/issues/110554 444f79cc3a Improve quiet light diff syntax highlighting. For #107926 07224f0681 update to latest DAP e24ea5ef61 Merge pull request #107926 from alisonnoyes/master 1a6d7f3118 [json] performance warning message can't be ignored. Fixes #105988 e6d6661247 fixes #111410 cfa02997d2 fixes #111413 e2dd774fa4 fix yarn retry logic 627ad0b4ee rename OnTypeRename -> LinkedEditing (for #109923) f13720627f Improve task dependency cycle check Fixes #111369 cd9be282b7 Add condition editing UI to breakpoint filters 6795d766a0 remove old logging API proposal, fixes https://github.com/microsoft/vscode/issues/85992 79b6d35bd6 remove TreeItem2 01bbb81052 Finalize markdown tree tooltip and resolveTreeItem Fixes #100741 016655c546 fixes #104629 8891878a3b bump cache 210a1a1327 Merge pull request #111405 from microsoft/joao/trusted-extension-uris 3495d2fd76 π 6391d710cf adopt latest loader, pass trusted types policy to loader, adopt in loader-usages 483e81f3b8 Fix duplicate port forwards for ipv4 vs ipv6 Fixes https://github.com/microsoft/vscode/issues/111400 f8d1c07e16 use createChannelReceiver, createChannelSender 995983da54 github: get all branches c3414f3cf3 Always show the open view option in the open in browser command cae277a203 Add a command for open port in browser Part of https://github.com/microsoft/vscode/issues/111402 2fb5b5b696 fixes #44542 0321ca5d96 fixes #106664 6c8f62432f Merge branch 'master' into aeschli/notebookIcons 8012c255e5 fix keybinding smoke test after icon name changes 4e45d27a72 fix stopIcon name 35a8955dc1 Merge branch 'master' into aeschli/notebookIcons 4ae452929e Merge pull request #111383 from microsoft/aeschli/extensionsIcons 3a92391c20 Merge pull request #111377 from microsoft/aeschli/preferencesIcons fddc9bb221 success/error icons f6249641f2 externalize notebook items bafc05ff0a fix retry 71836f95dd fixes #111366 6253e47773 #44542 ability to reveal setting 42bb62a06f Exclude endgame-plan label 1e0af43774 trusted ext urls: use 1 hour instead of 10 mins c471973938 Merge branch 'master' into aeschli/preferencesIcons 44ddde116f adopt checkProposedApiEnabled 14d59bef92 Allow status items with error background color (fix #110214) (#111353) 14415847e1 trusted extension urls 2cd7a70d62 original urls get passed along with openUrl ac9e250cce support node 15 cfe2e99ad8 debug: load all stack frames text shuold have initial color when selected so it is readable 4cb5bb656a Merge branch 'master' into aeschli/preferencesIcons 8e6517069a Merge branch 'master' into aeschli/extensionsIcons 98f80c4047 Fix #110698 8784b77bfd fix #110699 1e77bd81d8 registerCodicon 8234453386 update tests 83f8b96a94 add extension icons 43f5beb307 fix terminal icons 09f281dff6 dirty dff icons 2f0552737c terminal icons 5c2127ec74 Fix #110964 f70430eae4 download to temp location first and rename 26a0c24c6c fixes #111218 818174d4e8 bulk edit service: Show infinte progress when there is only 1 item since we do not know how long it takes 4ac4cf3dff some more cleanup, enfore proposed API checks, fyi @RMacfarlane c84fa206d4 add preferences icons c219b0673c π discover and mark more proposed types 44af5d2af2 marker view icons f0bb23ca02 more icon work 58a90729c4 externalize activitybar icons 1e6e371d3b :liptsick: sort API types and namespaces, enforce proposed API for types a94217739a Don't auto forward ports in WSL Fixes #111375 a5bda3ee95 support later node for building f81e91d1c9 Merge pull request #111363 from microsoft/joh/playwright cb8259c7b7 Fix forwarded ports restore race e5111fc439 Only show "Not Forwarded" when auto forward is disabled Part of microsoft/vscode-remote-release#4021 58fe1b9dfa Add badge back to ports view Part of microsoft/vscode-remote-release#4021 3018240290 add user data init markers 047063458b Merge branch 'master' into joh/playwright b2b5647451 disable two comparer test that fail in latest safari, https://github.com/microsoft/vscode/issues/111368 fyi @bpasero 6a974d536b Change port language to "forwarded" and add icon Part of microsoft/vscode-remote-release#4021 b269cd9464 Add open pull request query 2d4ec09c1d add yarn lock file 9ee2a1ee1e π update playwright 3c3ed7fb58 Fix #111351 b01183bda2 Add extension source to forwarded ports Part of microsoft/vscode-remote-release#4021 2f8f00d622 add dropDownButton-icon description 1aba2b87c6 fix unnecessary import 8648658c44 use codicon for openEditorWith picker a6a53198f6 make viewPaneContainer twisties themable 32a18e3f5b add Codicon.dropDownButton 20b649729e button: use CSSIcon 75c71b49cc Fix #107152 6692bf17e8 find completion item color in detail and at the start/end of documentation, fixes https://github.com/microsoft/vscode/issues/109794 d9c33ab941 Fix port nofication cooldown c13542b7ca Remove heading for forwarded ports Part of microsoft/vscode-remote-release#4021 ebaf0a2ef0 read line preview when having symbol results, https://github.com/microsoft/vscode/issues/109523 dcf4cd2a50 Improve tunnelFactory doc and remove an escaping undefined 8ba0fd356e IEnvironmentVariableInfo: Use ThemeIcon b4912314fc move file decoration API to stable, https://github.com/microsoft/vscode/issues/54938 38a200c746 π c6be304059 Ignore flush errors during dispose since the underlying socket might be already closed 2d2a9e7527 Prevent unwanted concatenation of "null" to feedback URL (#111325) 4031280b29 Go to symbol in editor, open to side should reset scroll position in original editor (fix #111346) 5e6a2779f6 add try/catch for #111177 d49955575e π relative pattern a5e20f89e4 π imports 392b6a94e0 perf - remove redundant performance usages d547170675 sandbox - move some changes from PR over to master 0a80aacc7b chore: update cache 764620efae fix: c++ exception in keytar module 5f569de4cd more removal of non-null 0921f711c3 Add GettingStartedService/Registry and initial getting started UI (#111175) ef03adf3a0 notebook editor widget always creates list in ctor. 3f0ada11fd core action active editor context should always have a view model. f24f7be7f0 less non-null operator in notebookEditorWidget 76882e4eb4 avoid memory leak of large text buffer from notebook cell text model. 2c20676f5c update distro (and hopefully unstuck builds) 2ecb47d4ec Use ThemeIcon & IconRegistry for custom icons c59ddc6a1f update distro cad45e538a Add `ProtocolMessageType.ReplayRequest` such that missing messages can be requested again 6edf58b9ae Avoid layer breaker (using `process` from `/browser/`) 3cd515d33e support installing web preferred extensions on web server af52f2cb8c `TextModel` should not dispose its `TextBuffer` 8dce3899da avoid unnecessary deepclone 5b243ab54b don't leak env vars into process.env; fixes #83187 b51a171a75 Update codicons |
||
---|---|---|
.. | ||
.vscode | ||
bin | ||
src | ||
test | ||
.npmignore | ||
extension-browser.webpack.config.js | ||
extension.webpack.config.js | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
VSCode JSON Language Server
The JSON Language server provides language-specific smarts for editing, validating and understanding JSON documents. It runs as a separate executable and implements the language server protocol to be connected by any code editor or IDE.
Capabilities
Server capabilities
The JSON language server supports requests on documents of language id json
and jsonc
.
json
documents are parsed and validated following the JSON specification.jsonc
documents additionally accept single line (//
) and multi-line comments (/* ... */
). JSONC is a VSCode specific file format, intended for VSCode configuration files, without any aspirations to define a new common file format.
The server implements the following capabilities of the language server protocol:
- Code completion for JSON properties and values based on the document's JSON schema or based on existing properties and values used at other places in the document. JSON schemas are configured through the server configuration options.
- Hover for values based on descriptions in the document's JSON schema.
- Document Symbols for quick navigation to properties in the document.
- Document Colors for showing color decorators on values representing colors and Color Presentation for color presentation information to support color pickers. The location of colors is defined by the document's JSON schema. All values marked with
"format": "color-hex"
(VSCode specific, non-standard JSON Schema extension) are considered color values. The supported color formats are#rgb[a]
and#rrggbb[aa]
. - Code Formatting supporting ranges and formatting the whole document.
- Folding Ranges for all folding ranges in the document.
- Semantic Selection for semantic selection for one or multiple cursor positions.
- Goto Definition for $ref references in JSON schemas
- Diagnostics (Validation) are pushed for all open documents
- syntax errors
- structural validation based on the document's JSON schema.
In order to load JSON schemas, the JSON server uses NodeJS http
and fs
modules. For all other features, the JSON server only relies on the documents and settings provided by the client through the LSP.
Client requirements:
The JSON language server expects the client to only send requests and notifications for documents of language id json
and jsonc
.
The JSON language server has the following dependencies on the client's capabilities:
- Code completion requires that the client capability has snippetSupport. If not supported by the client, the server will not offer the completion capability.
- Formatting support requires the client to support dynamicRegistration for rangeFormatting. If not supported by the client, the server will not offer the format capability.
Configuration
Initialization options
The client can send the following initialization options to the server:
provideFormatter: boolean | undefined
. If defined, the value defines whether the server provides thedocumentRangeFormattingProvider
capability on initialization. If undefined, the settingjson.format.enable
is used to determine whether formatting is provided. The formatter will then be registered through dynamic registration. If the client does not support dynamic registration, no formatter will be available.handledSchemaProtocols
: The URI schemas handles by the server. See sectionSchema configuration
below.customCapabilities
: Additional non-LSP client capabilities:rangeFormatting: { editLimit: x } }
: For performance reasons, limit the number of edits returned by the range formatter tox
.
Settings
Clients may send a workspace/didChangeConfiguration
notification to notify the server of settings changes.
The server supports the following settings:
-
http
proxy
: The URL of the proxy server to use when fetching schema. When undefined or empty, no proxy is used.proxyStrictSSL
: Whether the proxy server certificate should be verified against the list of supplied CAs.
-
json
format
enable
: Whether the server should register the formatting support. This option is only applicable if the client supports dynamicRegistration for rangeFormatting andinitializationOptions.provideFormatter
is not defined.
schemas
: Configures association of file names to schema URL or schemas and/or associations of schema URL to schema content.fileMatch
: an array of file names or paths (separated by/
).*
can be used as a wildcard. Exclusion patterns can also be defined and start with '!'. A file matches when there is at least one matching pattern and the last matching pattern is not an exclusion pattern.url
: The URL of the schema, optional when also a schema is provided.schema
: The schema content.
resultLimit
: The max number folding ranges and outline symbols to be computed (for performance reasons)
{
"http": {
"proxy": "",
"proxyStrictSSL": true
},
"json": {
"format": {
"enable": true
},
"schemas": [
{
"fileMatch": [
"foo.json",
"*.superfoo.json"
],
"url": "http://json.schemastore.org/foo",
"schema": {
"type": "array"
}
}
]
}
}
Schema configuration and custom schema content delivery
JSON schemas are essential for code assist, hovers, color decorators to work and are required for structural validation.
To find the schema for a given JSON document, the server uses the following mechanisms:
- JSON documents can define the schema URL using a
$schema
property - The settings define a schema association based on the documents URL. Settings can either associate a schema URL to a file or path pattern, and they can directly provide a schema.
- Additionally, schema associations can also be provided by a custom 'schemaAssociations' configuration call.
Schemas are identified by URLs. To load the content of a schema, the JSON language server either tries to load from that URI or path itself or delegates to the client.
The initializationOptions.handledSchemaProtocols
initialization option defines which URLs are handled by the server. Requests for all other URIs are sent to the client.
handledSchemaProtocols
is part of the initialization options and can't be changed while the server is running.
let clientOptions: LanguageClientOptions = {
initializationOptions: {
handledSchemaProtocols: ['file'] // language server should only try to load file URLs
}
...
}
If handledSchemaProtocols
is not set, the JSON language server will load the following URLs itself:
http
,https
: Loaded using NodeJS's HTTP support. Proxies can be configured through the settings.file
: Loaded using NodeJS'sfs
support.
Schema content request
Requests for schemas with URLs not handled by the server are forwarded to the client through an LSP request. This request is a JSON language server-specific, non-standardized, extension to the LSP.
Request:
- method: 'vscode/content'
- params:
string
- The schema URL to request. - response:
string
- The content of the schema with the given URL
Schema content change notification
When the client is aware that a schema content has changed, it will notify the server through a notification. This notification is a JSON language server-specific, non-standardized, extension to the LSP. The server will, as a response, clear the schema content from the cache and reload the schema content when required again.
Schema associations notification
In addition to the settings, schemas associations can also be provided through a notification from the client to the server. This notification is a JSON language server-specific, non-standardized, extension to the LSP.
Notification:
- method: 'json/schemaAssociations'
- params:
ISchemaAssociations
orISchemaAssociation[]
defined as follows
interface ISchemaAssociations {
/**
* An object where:
* - keys are file names or file paths (using `/` as path separator). `*` can be used as a wildcard.
* - values are an arrays of schema URIs
*/
[pattern: string]: string[];
}
interface ISchemaAssociation {
/**
* The URI of the schema, which is also the identifier of the schema.
*/
uri: string;
/**
* A list of file path patterns that are associated to the schema. The '*' wildcard can be used. Exclusion patterns starting with '!'.
* For example '*.schema.json', 'package.json', '!foo*.schema.json'.
* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
*/
fileMatch: string[];
/*
* The schema for the given URI.
* If no schema is provided, the schema will be fetched with the schema request service (if available).
*/
schema?: JSONSchema;
}
ISchemaAssociations
- keys: a file names or file path (separated by
/
).*
can be used as a wildcard. - values: An array of schema URLs
Notification:
- method: 'json/schemaContent'
- params:
string
the URL of the schema that has changed.
Item Limit
If the setting resultLimit
is set, the JSON language server will limit the number of folding ranges and document symbols computed.
When the limit is reached, a notification json/resultLimitReached
is sent that can be shown that can be shown to the user.
Notification:
- method: 'json/resultLimitReached'
- params: a human readable string to show to the user.
Try
The JSON language server is shipped with Visual Studio Code as part of the built-in VSCode extension json-language-features
. The server is started when the first JSON file is opened. The VSCode JSON documentation for detailed information on the user experience and has more information on how to configure the language support.
Integrate
If you plan to integrate the JSON language server into an editor and IDE, check out this page if there's already an LSP client integration available.
You can also launch the language server as a command and connect to it.
For that, install the json-language-server
npm module:
npm install -g json-language-server
Start the language server with the json-language-server
command. Use a command line argument to specify the preferred communication channel:
json-language-server --node-ipc
json-language-server --stdio
json-language-server --socket=<port>
To connect to the server from NodeJS, see Remy Suen's great write-up on how to communicate with the server through the available communication channels.
Participate
The source code of the JSON language server can be found in the VSCode repository at extensions/json-language-features/server.
File issues and pull requests in the VSCode GitHub Issues. See the document How to Contribute on how to build and run from source.
Most of the functionality of the server is located in libraries:
- jsonc-parser contains the JSON parser and scanner.
- vscode-json-languageservice contains the implementation of all features as a re-usable library.
- vscode-languageserver-node contains the implementation of language server for NodeJS.
Help on any of these projects is very welcome.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.