[gnome-builder/1089-lsp-client-capabilites-notify-workspace-configuration-support] GVls: improved server initialization
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/1089-lsp-client-capabilites-notify-workspace-configuration-support] GVls: improved server initialization
- Date: Fri, 14 Feb 2020 00:58:00 +0000 (UTC)
commit 610b6c03935ba5f5e14cafbdef830ba773996796
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Wed Feb 12 17:57:48 2020 -0600
GVls: improved server initialization
Fix issue #1089
src/plugins/gvls/gvls_plugin.py | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/gvls/gvls_plugin.py b/src/plugins/gvls/gvls_plugin.py
index 8c322b76d..49981ea91 100644
--- a/src/plugins/gvls/gvls_plugin.py
+++ b/src/plugins/gvls/gvls_plugin.py
@@ -26,6 +26,7 @@ by bridging them to our supervised Vala Language Server.
import gi
import os
+import sys
from gi.repository import GLib
from gi.repository import Gio
@@ -118,16 +119,28 @@ class GVlsService(Ide.Object):
self._supervisor.set_launcher(launcher)
self._supervisor.start()
- def _on_load_configuration(self, client):
- return 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),
- 'packages': GLib.Variant.new_strv([]),
- 'options': GLib.Variant.new_strv([]),
- })
+ def _on_load_configuration(instance, data):
+ try:
+ files = GLib.Variant ('av', {})
+ packages = GLib.Variant ('av', {})
+ vala_args = GLib.Variant ('av', {})
+ options = GLib.Variant ('av', {})
+ return 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),
+ 'mesonBuildSystem': GLib.Variant.new_boolean(True),
+ 'files': files,
+ 'packages': packages,
+ 'valaArgs': vala_args,
+ 'options': vala_args,
+ })
+ except:
+ print ('Invalid code!!!')
+ return GLib.Variant ('av', {})
+
def _gvls_spawned(self, supervisor, subprocess):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]