[gnome-builder/1074-vala-language-server-add-support-using-gvls: 27/33] GVls: increasing completion priority



commit ed1db04105b8b4793ede3ca67ccfded1bc83fdf8
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Tue Nov 19 13:48:10 2019 -0600

    GVls: increasing completion priority

 src/plugins/gvls/gvls.plugin           |  2 +-
 src/plugins/gvls/gvls_plugin.py        | 14 ++++++++------
 src/plugins/vala-pack/vala-pack.plugin |  1 +
 3 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/gvls/gvls.plugin b/src/plugins/gvls/gvls.plugin
index 6c890cd20..f280af84a 100644
--- a/src/plugins/gvls/gvls.plugin
+++ b/src/plugins/gvls/gvls.plugin
@@ -9,4 +9,4 @@ Loader=python3
 Module=gvls_plugin
 X-Builder-ABI=3.32
 X-Completion-Provider-Languages=vala
-
+X-Completion-Provider-Languages-Priority=0
diff --git a/src/plugins/gvls/gvls_plugin.py b/src/plugins/gvls/gvls_plugin.py
index 34dd70356..4581d5ad7 100644
--- a/src/plugins/gvls/gvls_plugin.py
+++ b/src/plugins/gvls/gvls_plugin.py
@@ -26,7 +26,6 @@ by bridging them to our supervised Vala Language Server.
 
 import gi
 import os
-import gvls_server
 
 from gi.repository import GLib
 from gi.repository import Gio
@@ -86,9 +85,12 @@ class GVlsService(Ide.Object):
 
     def do_stop(self):
         """
-        Stops the Rust Language Server upon request to shutdown the
+        Stops the Vala Language Server upon request to shutdown the
         GVlsService.
         """
+        if self._client is not None:
+            print ("Shutting down server")
+            _client.stop ()
         if self._monitor is not None:
             monitor, self._monitor = self._monitor, None
             if monitor is not None:
@@ -124,7 +126,7 @@ class GVlsService(Ide.Object):
             launcher.set_cwd(workdir.get_path())
 
             # If org.gnome.gvls.stdio.Server is installed by GVls
-            path_to_rls = gvls_server.gvls_stdio_server
+            path_to_rls = 'org.gnome.gvls.stdio.Server'
 
             # Setup our Argv. We want to communicate over STDIN/STDOUT,
             # so it does not require any command line options.
@@ -185,9 +187,9 @@ class GVlsService(Ide.Object):
         self._ensure_started()
         self.bind_property('client', provider, 'client', GObject.BindingFlags.SYNC_CREATE)
 
-class GVlsDiagnosticProvider(Ide.LspDiagnosticProvider):
-    def do_load(self):
-        GVlsService.bind_client(self)
+#class GVlsDiagnosticProvider(Ide.LspDiagnosticProvider):
+#    def do_load(self):
+#        GVlsService.bind_client(self)
 
 class GVlsCompletionProvider(Ide.LspCompletionProvider):
     def do_load(self, context):
diff --git a/src/plugins/vala-pack/vala-pack.plugin b/src/plugins/vala-pack/vala-pack.plugin
index 42eb787ea..76cec962e 100644
--- a/src/plugins/vala-pack/vala-pack.plugin
+++ b/src/plugins/vala-pack/vala-pack.plugin
@@ -9,6 +9,7 @@ X-Builder-ABI=@PACKAGE_ABI@
 X-Code-Indexer-Languages-Priority=100
 X-Code-Indexer-Languages=vala
 X-Completion-Provider-Languages=vala
+X-Completion-Provider-Languages-Priority=100
 X-Diagnostic-Provider-Languages=vala
 X-Indenter-Languages-Priority=0
 X-Indenter-Languages=vala


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]