[gnome-builder/1074-vala-language-server-add-support-using-gvls: 20/24] GVls: fixing Variant construct for server configuration
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/1074-vala-language-server-add-support-using-gvls: 20/24] GVls: fixing Variant construct for server configuration
- Date: Sat, 14 Dec 2019 04:50:01 +0000 (UTC)
commit d1b2ff7079dfdf371ea3a58f7aae3081e262ed95
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Tue Dec 10 13:25:40 2019 -0600
GVls: fixing Variant construct for server configuration
src/plugins/gvls/gvls_plugin.py | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/src/plugins/gvls/gvls_plugin.py b/src/plugins/gvls/gvls_plugin.py
index a2fe6b001..88d22d812 100644
--- a/src/plugins/gvls/gvls_plugin.py
+++ b/src/plugins/gvls/gvls_plugin.py
@@ -118,36 +118,37 @@ class GVlsService(Ide.Object):
self._supervisor.start()
def _on_load_configuration(self):
- if DEV_MODE
+ if DEV_MODE:
print ("Creating Vala Language Server Configuration response")
- conf = GLib.VariantBuilder (GLib.Variant ('a{sv}'))
- conf.add ('{sv}', 'initialized', GLib.Variant.boolean (True))
- conf.add ('{sv}', 'initialized', GLib.Variant.boolean (True))
- conf.add ('{sv}', 'defaultNamespaces', GLib.Variant.boolean (True))
- conf.add ('{sv}', 'defaultVapiDirs', GLib.Variant.boolean (True))
- conf.add ('{sv}', 'scanWorkspace', GLib.Variant.boolean (True))
- conf.add ('{sv}', 'addUsingNamespaces', GLib.Variant.boolean (True))
+ conf = GLib.Variant('a{sv}', {
+ 'initialized': GLib.Variant.new_boolean(True),
+ 'defaultNamespaces': GLib.Variant.new_boolean(True),
+ 'defaultVapiDirs': GLib.Variant.new_boolean(True),
+ 'scanWorkspace': GLib.Variant.new_boolean(True),
+ 'addUsingNamespaces': GLib.Variant.new_boolean(True),
+ })
- pkgs = GLib.VariantBuilder (GLib.Variant ('av'))
+
+ # pkgs = GLib.VariantBuilder (GLib.Variant ('av'))
# Get from build environment
# pkgs.add ('v', GLib.Variant.string ())
- vargs = GLib.VariantBuilder (GLib.Variant ('av'))
+ # vargs = GLib.VariantBuilder (GLib.Variant ('av'))
# Get from build environment
# vargs.add ('v', GLib.Variant.string ())
- opts = GLib.VariantBuilder (GLib.Variant ('av'))
+ # opts = GLib.VariantBuilder (GLib.Variant ('av'))
# Get from build environment
# vargs.add ('v', GLib.Variant.string ())
- conf.add ('{sv}', 'packages', pkgs)
- conf.add ('{sv}', 'valaArgs', vargs)
- conf.add ('{sv}', 'options', opts)
+ # conf.add ('{sv}', 'packages', pkgs)
+ # conf.add ('{sv}', 'valaArgs', vargs)
+ # conf.add ('{sv}', 'options', opts)
- conf.end ()
- if DEV_MODE
+ if DEV_MODE:
print ("Configuration response: "+conf.print(True))
+
return conf
def _gvls_spawned(self, supervisor, subprocess):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]