Skip to content

Commit 6ef0baf

Browse files
committed
Merge branch 'main' of github.com:redhat-developer/yaml-language-server into completion-modeline-comment
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
2 parents 5e63024 + f7377aa commit 6ef0baf

19 files changed

+443
-1163
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### 1.1.1
2+
3+
- Fix: Autocomplete should not escape colon without white-space following [#571](https://github.com/redhat-developer/yaml-language-server/issues/571)
4+
- Fix: Unescape regexp string to be compatible with 'u' flag [#576](https://github.com/redhat-developer/yaml-language-server/pull/576)
5+
6+
### 1.1.0
7+
8+
- Add Web VSCode support [#594](https://github.com/redhat-developer/vscode-yaml/pull/594)
9+
- schemas: Unicode support for pattern and patternProperties keywords [#554](https://github.com/redhat-developer/yaml-language-server/issues/554)
10+
- Fix: IntelliSense broken with v1.0.0 [#616](https://github.com/redhat-developer/vscode-yaml/issues/616)
11+
- Fix: Cannot read property '0' of undefined Code [#617](https://github.com/redhat-developer/vscode-yaml/issues/617)
12+
- Fix: Completion of second level for Camel K files are no more working [#619](https://github.com/redhat-developer/vscode-yaml/issues/619)
13+
- Provide completion for inlined schema syntax [#559](https://github.com/redhat-developer/yaml-language-server/issues/559)
14+
- Fix: Schema comment ignored if it isn't the first line in the file. [#618](https://github.com/redhat-developer/vscode-yaml/issues/618)
15+
16+
Thanks to Johnny Graettinger, Martin Aeschlimann and Aurélien Pupier
17+
118
### 1.0.0
219
- Use [eemeli/yaml](https://github.com/eemeli/yaml) as YAML parser [#421](https://github.com/redhat-developer/yaml-language-server/issues/421)
320
- Fix: Completion provider: t.replace is not a function [#547](https://github.com/redhat-developer/yaml-language-server/issues/547)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "yaml-language-server",
33
"description": "YAML language server",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"author": "Gorkem Ercan (Red Hat)",
66
"license": "MIT",
77
"contributors": [

src/languageserver/handlers/languageHandlers.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ import {
1717
Connection,
1818
TextDocumentPositionParams,
1919
CodeLensParams,
20+
DefinitionParams,
2021
} from 'vscode-languageserver';
21-
import { CodeLens, DocumentSymbol, Hover, SymbolInformation, TextEdit } from 'vscode-languageserver-types';
22+
import { CodeLens, DefinitionLink, DocumentSymbol, Hover, SymbolInformation, TextEdit } from 'vscode-languageserver-types';
2223
import { isKubernetesAssociatedDocument } from '../../languageservice/parser/isKubernetes';
2324
import { LanguageService } from '../../languageservice/yamlLanguageService';
2425
import { SettingsState } from '../../yamlSettings';
@@ -57,6 +58,7 @@ export class LanguageHandlers {
5758
this.connection.onDocumentOnTypeFormatting((params) => this.formatOnTypeHandler(params));
5859
this.connection.onCodeLens((params) => this.codeLensHandler(params));
5960
this.connection.onCodeLensResolve((params) => this.codeLensResolveHandler(params));
61+
this.connection.onDefinition((params) => this.definitionHandler(params));
6062

6163
this.yamlSettings.documents.onDidChangeContent((change) => this.cancelLimitExceededWarnings(change.document.uri));
6264
this.yamlSettings.documents.onDidClose((event) => this.cancelLimitExceededWarnings(event.document.uri));
@@ -219,6 +221,15 @@ export class LanguageHandlers {
219221
return this.languageService.resolveCodeLens(param);
220222
}
221223

224+
definitionHandler(params: DefinitionParams): DefinitionLink[] {
225+
const textDocument = this.yamlSettings.documents.get(params.textDocument.uri);
226+
if (!textDocument) {
227+
return;
228+
}
229+
230+
return this.languageService.doDefinition(textDocument, params);
231+
}
232+
222233
// Adapted from:
223234
// https://github.com/microsoft/vscode/blob/94c9ea46838a9a619aeafb7e8afd1170c967bb55/extensions/json-language-features/server/src/jsonServer.ts#L172
224235
private cancelLimitExceededWarnings(uri: string): void {

0 commit comments

Comments
 (0)