Пример #1
0
        private async Task <ExampleSettings> GetDocumentSettingsInternal(Uri resource)
        {
            var response = await proxy.Workspace.Configuration(new ConfigurationParams
            {
                items = new[]
                {
                    new ConfigurationItem
                    {
                        scopeUri = resource,
                        section  = "languageServerExample"
                    }
                }
            });

            var settings = response.SuccessValue[0];

            return(ExampleSettings.Create(settings));
        }
Пример #2
0
        private void OnDidChangeConfiguration(NotificationMessage <DidChangeConfigurationParams> message)
        {
            var change = message.@params;

            if (hasConfigurationCapability)
            {
                // Reset all cached document settings
                documentSettings.Clear();
            }
            else
            {
                globalSettings = ExampleSettings.Create(change?.settings);
            }

            foreach (var doc in documents.All)
            {
                var ignore = ValidateTextDocument(doc);
            }
        }