From d5f9985edbe088c0ff645e9cf8aeac18976991f9 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 13 Jul 2017 16:27:01 -0700 Subject: [PATCH] JSON completion provider doesn't work without triggering characters. --- .../extending-language-services-completion-provider-example.html | 1 + .../completion-provider-example/sample.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/playground.generated/extending-language-services-completion-provider-example.html b/test/playground.generated/extending-language-services-completion-provider-example.html index c61819ef..4d81feea 100644 --- a/test/playground.generated/extending-language-services-completion-provider-example.html +++ b/test/playground.generated/extending-language-services-completion-provider-example.html @@ -63,6 +63,7 @@ function createDependencyProposals() { monaco.languages.registerCompletionItemProvider('json', { + triggerCharacters: ['\"'], provideCompletionItems: function(model, position) { // find out if we are completing a property in the 'dependencies' object. var textUntilPosition = model.getValueInRange({startLineNumber: 1, startColumn: 1, endLineNumber: position.lineNumber, endColumn: position.column}); diff --git a/website/playground/new-samples/extending-language-services/completion-provider-example/sample.js b/website/playground/new-samples/extending-language-services/completion-provider-example/sample.js index 4f58251e..4a8b2913 100644 --- a/website/playground/new-samples/extending-language-services/completion-provider-example/sample.js +++ b/website/playground/new-samples/extending-language-services/completion-provider-example/sample.js @@ -25,6 +25,7 @@ function createDependencyProposals() { monaco.languages.registerCompletionItemProvider('json', { + triggerCharacters: ['\"'], provideCompletionItems: function(model, position) { // find out if we are completing a property in the 'dependencies' object. var textUntilPosition = model.getValueInRange({startLineNumber: 1, startColumn: 1, endLineNumber: position.lineNumber, endColumn: position.column});