[gnome-builder/1074-vala-language-server-add-support-using-gvls: 10/18] plugins: added GVls as Vala Language Server
- 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: 10/18] plugins: added GVls as Vala Language Server
- Date: Thu, 5 Dec 2019 13:55:54 +0000 (UTC)
commit 6c436a0d80ebf5c2f3a05492a412e660f9a8cdd9
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Mon Nov 18 13:14:08 2019 -0600
plugins: added GVls as Vala Language Server
src/plugins/gvls/gvls.plugin | 9 ++++++---
src/plugins/gvls/gvls_plugin.py | 26 +++-----------------------
src/plugins/gvls/meson.build | 4 ++--
src/plugins/meson.build | 1 +
4 files changed, 12 insertions(+), 28 deletions(-)
---
diff --git a/src/plugins/gvls/gvls.plugin b/src/plugins/gvls/gvls.plugin
index dc826e62c..6c890cd20 100644
--- a/src/plugins/gvls/gvls.plugin
+++ b/src/plugins/gvls/gvls.plugin
@@ -1,9 +1,12 @@
# gvls.plugin
[Plugin]
-Name=GNOME Vala Language Server for GNOME Builder plugin
-Module=gvls-plugin
Author=Daniel Espinosa
-Description=GNOME Builder plugin for GVLS, without any LPS protocol support
+Name=GNOME Vala Language Server for GNOME Builder plugin
+Description=GNOME Builder plugin for GVLS using LSP
Copyright=Copyright © 2019 Daniel Espinosa
+Builtin=true
+Loader=python3
+Module=gvls_plugin
+X-Builder-ABI=3.32
X-Completion-Provider-Languages=vala
diff --git a/src/plugins/gvls/gvls_plugin.py b/src/plugins/gvls/gvls_plugin.py
index b95ded550..34dd70356 100644
--- a/src/plugins/gvls/gvls_plugin.py
+++ b/src/plugins/gvls/gvls_plugin.py
@@ -26,13 +26,14 @@ 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
from gi.repository import GObject
from gi.repository import Ide
-DEV_MODE = False
+DEV_MODE = True
class GVlsService(Ide.Object):
_client = None
@@ -116,7 +117,6 @@ class GVlsService(Ide.Object):
# Setup a launcher to spawn the rust language server
launcher = self._create_launcher()
launcher.set_clear_env(False)
- sysroot = self._discover_sysroot()
if DEV_MODE:
launcher.setenv('RUST_LOG', 'debug', True)
# Locate the directory of the project and run gvls from there.
@@ -124,7 +124,7 @@ class GVlsService(Ide.Object):
launcher.set_cwd(workdir.get_path())
# If org.gnome.gvls.stdio.Server is installed by GVls
- path_to_rls = "org.gnome.gvls.stdio.Server"
+ path_to_rls = gvls_server.gvls_stdio_server
# Setup our Argv. We want to communicate over STDIN/STDOUT,
# so it does not require any command line options.
@@ -198,24 +198,4 @@ class GVlsCompletionProvider(Ide.LspCompletionProvider):
# want the results. So use high priority (negative is better).
return -1000
-class GVlsRenameProvider(Ide.LspRenameProvider):
- def do_load(self):
- GVlsService.bind_client(self)
-
-class GVlsSymbolResolver(Ide.LspSymbolResolver):
- def do_load(self):
- GVlsService.bind_client(self)
-
-class GVlsHighlighter(Ide.LspHighlighter):
- def do_load(self):
- GVlsService.bind_client(self)
-
-class GVlsFormatter(Ide.LspFormatter):
- def do_load(self):
- GVlsService.bind_client(self)
-class GVlsHoverProvider(Ide.LspHoverProvider):
- def do_prepare(self):
- self.props.category = 'Vala'
- self.props.priority = 200
- GVlsService.bind_client(self)
diff --git a/src/plugins/gvls/meson.build b/src/plugins/gvls/meson.build
index 248c8a39c..86295da69 100644
--- a/src/plugins/gvls/meson.build
+++ b/src/plugins/gvls/meson.build
@@ -1,7 +1,5 @@
if get_option('plugin_gvls')
-#dependency('gvls-0.12')
-
install_data('gvls_plugin.py', install_dir: plugindir)
configure_file(
@@ -12,4 +10,6 @@ configure_file(
install_dir: plugindir,
)
+gvls_stdio_server = find_program('org.gnome.gvsl.stdio.Server')
+
endif
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 2c185658e..dd3dc631c 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -187,6 +187,7 @@ status += [
'Sysprof ............... : @0@'.format(get_option('plugin_sysprof')),
'Sysroot ............... : @0@'.format(get_option('plugin_sysroot')),
'Todo .................. : @0@'.format(get_option('plugin_todo')),
+ 'Vala Language Server... : @0@'.format(get_option('plugin_gvls')),
'Vala Pack ............. : @0@'.format(get_option('plugin_vala')),
'Vagrant ............... : @0@'.format(get_option('plugin_vagrant')),
'Valgrind .............. : @0@'.format(get_option('plugin_valgrind')),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]