mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode c873727e8bac95e7cbf5b154a9e6ae0986f2ce18 (#6446)
This commit is contained in:
@@ -1 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3-.795 0-1.545-.311-2.107-.868-.563-.567-.873-1.317-.873-2.111 0-1.431 1.007-2.632 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012l3.061-2.582-4.919-4.1h-1.137v2.404c-3.429.318-6.121 3.211-6.121 6.721 0 1.809.707 3.508 1.986 4.782 1.277 1.282 2.976 1.988 4.784 1.988 3.722 0 6.75-3.028 6.75-6.75 0-1.245-.349-2.468-1.007-3.536z" fill="#2D2D30"/><path d="M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4-1.098 0-2.093-.445-2.817-1.164-.718-.724-1.163-1.718-1.163-2.815 0-2.206 1.794-4 4-4l.351.025v1.85s1.626-1.342 1.631-1.339l1.869-1.577-3.5-2.917v2.218l-.371-.03c-3.176 0-5.75 2.574-5.75 5.75 0 1.593.648 3.034 1.695 4.076 1.042 1.046 2.482 1.694 4.076 1.694 3.176 0 5.75-2.574 5.75-5.75-.001-1.106-.318-2.135-.859-3.012z" fill="#C5C5C5"/></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.56253 2.51574C3.46348 3.45007 2 5.55411 2 7.99996C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 7.99996C14 5.32516 12.2497 3.05916 9.83199 2.28479L9.52968 3.23829C11.5429 3.88451 13 5.77207 13 7.99996C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 7.99996C3 6.31101 3.83742 4.81764 5.11969 3.91242L5.56253 2.51574Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3H2V2H5.5L6 2.5V6H5V3Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 589 B |
@@ -1 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3-.795 0-1.545-.311-2.107-.868-.563-.567-.873-1.317-.873-2.111 0-1.431 1.007-2.632 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012l3.061-2.582-4.919-4.1h-1.137v2.404c-3.429.318-6.121 3.211-6.121 6.721 0 1.809.707 3.508 1.986 4.782 1.277 1.282 2.976 1.988 4.784 1.988 3.722 0 6.75-3.028 6.75-6.75 0-1.245-.349-2.468-1.007-3.536z" fill="#F6F6F6"/><path d="M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4-1.098 0-2.093-.445-2.817-1.164-.718-.724-1.163-1.718-1.163-2.815 0-2.206 1.794-4 4-4l.351.025v1.85s1.626-1.342 1.631-1.339l1.869-1.577-3.5-2.917v2.218l-.371-.03c-3.176 0-5.75 2.574-5.75 5.75 0 1.593.648 3.034 1.695 4.076 1.042 1.046 2.482 1.694 4.076 1.694 3.176 0 5.75-2.574 5.75-5.75-.001-1.106-.318-2.135-.859-3.012z" fill="#424242"/></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.56253 2.51574C3.46348 3.45007 2 5.55411 2 7.99996C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 7.99996C14 5.32516 12.2497 3.05916 9.83199 2.28479L9.52968 3.23829C11.5429 3.88451 13 5.77207 13 7.99996C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 7.99996C3 6.31101 3.83742 4.81764 5.11969 3.91242L5.56253 2.51574Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3H2V2H5.5L6 2.5V6H5V3Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 589 B |
@@ -63,11 +63,20 @@ function registerVariableCompletions(pattern: string): vscode.Disposable {
|
||||
const indexOf$ = document.lineAt(position.line).text.indexOf('$');
|
||||
const startPosition = indexOf$ >= 0 ? new vscode.Position(position.line, indexOf$) : position;
|
||||
|
||||
return [{ label: 'workspaceFolder', detail: localize('workspaceFolder', "The path of the folder opened in VS Code") }, { label: 'workspaceFolderBasename', detail: localize('workspaceFolderBasename', "The name of the folder opened in VS Code without any slashes (/)") },
|
||||
{ label: 'relativeFile', detail: localize('relativeFile', "The current opened file relative to ${workspaceFolder}") }, { label: 'file', detail: localize('file', "The current opened file") }, { label: 'cwd', detail: localize('cwd', "The task runner's current working directory on startup") },
|
||||
{ label: 'lineNumber', detail: localize('lineNumber', "The current selected line number in the active file") }, { label: 'selectedText', detail: localize('selectedText', "The current selected text in the active file") },
|
||||
{ label: 'fileDirname', detail: localize('fileDirname', "The current opened file's dirname") }, { label: 'fileExtname', detail: localize('fileExtname', "The current opened file's extension") }, { label: 'fileBasename', detail: localize('fileBasename', "The current opened file's basename") },
|
||||
{ label: 'fileBasenameNoExtension', detail: localize('fileBasenameNoExtension', "The current opened file's basename with no file extension") }].map(variable => ({
|
||||
return [
|
||||
{ label: 'workspaceFolder', detail: localize('workspaceFolder', "The path of the folder opened in VS Code") },
|
||||
{ label: 'workspaceFolderBasename', detail: localize('workspaceFolderBasename', "The name of the folder opened in VS Code without any slashes (/)") },
|
||||
{ label: 'relativeFile', detail: localize('relativeFile', "The current opened file relative to ${workspaceFolder}") },
|
||||
{ label: 'relativeFileDirname', detail: localize('relativeFileDirname', "The current opened file's dirname relative to ${workspaceFolder}") },
|
||||
{ label: 'file', detail: localize('file', "The current opened file") },
|
||||
{ label: 'cwd', detail: localize('cwd', "The task runner's current working directory on startup") },
|
||||
{ label: 'lineNumber', detail: localize('lineNumber', "The current selected line number in the active file") },
|
||||
{ label: 'selectedText', detail: localize('selectedText', "The current selected text in the active file") },
|
||||
{ label: 'fileDirname', detail: localize('fileDirname', "The current opened file's dirname") },
|
||||
{ label: 'fileExtname', detail: localize('fileExtname', "The current opened file's extension") },
|
||||
{ label: 'fileBasename', detail: localize('fileBasename', "The current opened file's basename") },
|
||||
{ label: 'fileBasenameNoExtension', detail: localize('fileBasenameNoExtension', "The current opened file's basename with no file extension") }
|
||||
].map(variable => ({
|
||||
label: '${' + variable.label + '}',
|
||||
range: new vscode.Range(startPosition, position),
|
||||
detail: variable.detail
|
||||
|
||||
@@ -21,6 +21,8 @@ The server implements the following capabilities of the language server protocol
|
||||
- [Document Symbols](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) for quick navigation to properties in the document.
|
||||
- [Document Colors](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentColor) for showing color decorators on values representing colors and [Color Presentation](https://microsoft.github.io/language-server-protocol/specification#textDocument_colorPresentation) for color presentation information to support color pickers. The location of colors is defined by the document's [JSON schema](http://json-schema.org/). 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](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting) supporting ranges and formatting the whole document.
|
||||
- [Folding Ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange) for all folding ranges in the document.
|
||||
- Semantic Selection for semantic selection for one or multiple cursor positions.
|
||||
- [Diagnostics (Validation)](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) are pushed for all open documents
|
||||
- syntax errors
|
||||
- structural validation based on the document's [JSON schema](http://json-schema.org/).
|
||||
@@ -90,10 +92,39 @@ To find the schema for a given JSON document, the server uses the following mech
|
||||
- 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 tries to load from that URL or path. The following URL schemas are supported:
|
||||
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 send to the client.
|
||||
|
||||
`handledSchemaProtocols` is part of the initialization options and can't be changed while the server is running.
|
||||
|
||||
```ts
|
||||
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's `fs` support.
|
||||
- `vscode`: Loaded by an LSP call to the client.
|
||||
|
||||
#### 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
|
||||
|
||||
@@ -111,20 +142,6 @@ interface ISchemaAssociations {
|
||||
- keys: a file names or file path (separated by `/`). `*` can be used as a wildcard.
|
||||
- values: An array of schema URLs
|
||||
|
||||
#### Schema content request
|
||||
|
||||
The schema content for schema URLs that start with `vscode://` will be requested from 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. The server will only ask for URLs that start with `vscode://`
|
||||
- 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.
|
||||
|
||||
Notification:
|
||||
- method: 'json/schemaContent'
|
||||
- params: `string` the URL of the schema that has changed.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vscode-json-languageserver",
|
||||
"description": "JSON language server",
|
||||
"version": "1.0.1",
|
||||
"version": "1.2.0",
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
||||
@@ -10,7 +10,7 @@ let fs = require('fs');
|
||||
let https = require('https');
|
||||
let url = require('url');
|
||||
|
||||
// list of languagesIs not shipped with VSCode. The information is used to associate an icon with a langauge association
|
||||
// list of languagesIs not shipped with VSCode. The information is used to associate an icon with a language association
|
||||
let nonBuiltInLanguages = { // { fileNames, extensions }
|
||||
"r": { extensions: ['r', 'rhistory', 'rprofile', 'rt'] },
|
||||
"argdown": { extensions: ['ad', 'adown', 'argdown', 'argdn'] },
|
||||
@@ -35,7 +35,7 @@ let nonBuiltInLanguages = { // { fileNames, extensions }
|
||||
"todo": { fileNames: ['todo'] }
|
||||
};
|
||||
|
||||
let FROM_DISK = false; // set to true to take content from a repo checkedout next to the vscode repo
|
||||
let FROM_DISK = true; // set to true to take content from a repo checked out next to the vscode repo
|
||||
|
||||
let font, fontMappingsFile, fileAssociationFile, colorsFile;
|
||||
if (!FROM_DISK) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"git": {
|
||||
"name": "seti-ui",
|
||||
"repositoryUrl": "https://github.com/jesseweed/seti-ui",
|
||||
"commitHash": "89175d7f9e0c70cd325b80a18a3c77fc8eb7c798"
|
||||
"commitHash": "904c16acced1134a81b31d71d60293288c31334b"
|
||||
}
|
||||
},
|
||||
"version": "0.1.0"
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user