[gnome-builder/wip/chergert/lsp-plugin-loader: 14/24] plugins/vala-language-server: port vls to generic LSP plugin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/lsp-plugin-loader: 14/24] plugins/vala-language-server: port vls to generic LSP plugin
- Date: Fri, 14 Oct 2022 17:13:06 +0000 (UTC)
commit 08758c77fabb73062f799f8a3225b838990a1878
Author: Christian Hergert <chergert redhat com>
Date: Fri Oct 14 10:40:17 2022 -0500
plugins/vala-language-server: port vls to generic LSP plugin
And rename the plugin from vls to vala-language-server so it matches the
actual binary name we're executing in the build container.
meson_options.txt | 2 +-
src/plugins/meson.build | 4 +-
src/plugins/vala-language-server/meson.build | 11 +++
src/plugins/vala-language-server/settings.json | 4 +
.../vala-language-server.gresource.xml | 7 ++
.../vala-language-server.plugin} | 20 +++--
src/plugins/vls/gbp-vls-code-action-provider.c | 65 -----------------
src/plugins/vls/gbp-vls-code-action-provider.h | 31 --------
src/plugins/vls/gbp-vls-completion-provider.c | 61 ----------------
src/plugins/vls/gbp-vls-completion-provider.h | 31 --------
src/plugins/vls/gbp-vls-diagnostic-provider.c | 65 -----------------
src/plugins/vls/gbp-vls-diagnostic-provider.h | 31 --------
src/plugins/vls/gbp-vls-formatter.c | 65 -----------------
src/plugins/vls/gbp-vls-formatter.h | 31 --------
src/plugins/vls/gbp-vls-highlighter.c | 65 -----------------
src/plugins/vls/gbp-vls-highlighter.h | 31 --------
src/plugins/vls/gbp-vls-hover-provider.c | 66 -----------------
src/plugins/vls/gbp-vls-hover-provider.h | 31 --------
src/plugins/vls/gbp-vls-rename-provider.c | 65 -----------------
src/plugins/vls/gbp-vls-rename-provider.h | 31 --------
src/plugins/vls/gbp-vls-search-provider.c | 85 ----------------------
src/plugins/vls/gbp-vls-search-provider.h | 31 --------
src/plugins/vls/gbp-vls-service.c | 57 ---------------
src/plugins/vls/gbp-vls-service.h | 31 --------
src/plugins/vls/gbp-vls-symbol-resolver.c | 65 -----------------
src/plugins/vls/gbp-vls-symbol-resolver.h | 31 --------
src/plugins/vls/meson.build | 25 -------
src/plugins/vls/vls-plugin.c | 73 -------------------
src/plugins/vls/vls.gresource.xml | 6 --
29 files changed, 37 insertions(+), 1084 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index ad2444b6f..6858e5a6e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -86,8 +86,8 @@ option('plugin_ts_language_server', type: 'boolean')
option('plugin_update_manager', type: 'boolean')
option('plugin_valac', type: 'boolean')
option('plugin_vala_indenter', type: 'boolean')
+option('plugin_vala_language_server', type: 'boolean')
option('plugin_valgrind', type: 'boolean')
-option('plugin_vls', type: 'boolean')
option('plugin_waf', type: 'boolean')
option('plugin_words', type: 'boolean')
option('plugin_xml_pack', type: 'boolean')
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index ef0ae4fe6..5fcd43a50 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -138,10 +138,10 @@ subdir('update-dependencies')
subdir('update-manager')
subdir('valac')
subdir('vala-indenter')
+subdir('vala-language-server')
subdir('valgrind')
subdir('vcsui')
subdir('vim')
-subdir('vls')
subdir('waf')
subdir('web-browser')
subdir('words')
@@ -231,7 +231,7 @@ status += [
'serve-d .......................... (D) : @0@'.format(get_option('plugin_serve_d')),
'rust-analyzer ................. (Rust) : @0@'.format(get_option('plugin_rust_analyzer')),
'ts-language-server ... (JS/TypeScript) : @0@'.format(get_option('plugin_ts_language_server')),
- 'vala-language-server .......... (Vala) : @0@'.format(get_option('plugin_vls')),
+ 'vala-language-server .......... (Vala) : @0@'.format(get_option('plugin_vala_language_server')),
'',
' ** Denotes plugins not recommended for distribution',
'',
diff --git a/src/plugins/vala-language-server/meson.build b/src/plugins/vala-language-server/meson.build
new file mode 100644
index 000000000..45d819e58
--- /dev/null
+++ b/src/plugins/vala-language-server/meson.build
@@ -0,0 +1,11 @@
+if get_option('plugin_vala_language_server')
+
+plugin_vala_language_server_resources = gnome.compile_resources(
+ 'vala-language-server-resources',
+ 'vala-language-server.gresource.xml',
+ c_name: 'gbp_vls',
+)
+
+plugins_sources += plugin_vala_language_server_resources
+
+endif
diff --git a/src/plugins/vala-language-server/settings.json b/src/plugins/vala-language-server/settings.json
new file mode 100644
index 000000000..99f94415e
--- /dev/null
+++ b/src/plugins/vala-language-server/settings.json
@@ -0,0 +1,4 @@
+{
+ "vala-language-server" : {
+ }
+}
diff --git a/src/plugins/vala-language-server/vala-language-server.gresource.xml
b/src/plugins/vala-language-server/vala-language-server.gresource.xml
new file mode 100644
index 000000000..54d9e925a
--- /dev/null
+++ b/src/plugins/vala-language-server/vala-language-server.gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/plugins/vala-language-server">
+ <file>vala-language-server.plugin</file>
+ <file>settings.json</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/vls/vls.plugin b/src/plugins/vala-language-server/vala-language-server.plugin
similarity index 59%
rename from src/plugins/vls/vls.plugin
rename to src/plugins/vala-language-server/vala-language-server.plugin
index 7b52ceccf..cab3cf7ed 100644
--- a/src/plugins/vls/vls.plugin
+++ b/src/plugins/vala-language-server/vala-language-server.plugin
@@ -1,20 +1,24 @@
[Plugin]
-Name=Vala Language Server
+Authors=Princeton Ferro, Ben Iofel, Christian Hergert
+Copyright=Copyright © 2020 Princeton Ferro, Ben Iofel, Copyright © 2022 Christian Hergert
Description=Vala code intelligence provided by vala-language-server
-Authors=Princeton Ferro, Ben Iofel
-Copyright=Copyright © 2020
-Module=vls
-Embedded=_gbp_vls_register_types
+Embedded=ide_lsp_plugin_register_types
+Module=vala-language-server
+Name=Vala Language Server
+Website=https://github.com/vala-lang/vala-language-server
X-Category=lsps
X-Code-Action-Languages=vala
X-Completion-Provider-Languages=vala
-X-Diagnostic-Provider-Languages=vala
X-Diagnostic-Provider-Languages-Priority=100
-X-Formatter-Languages=vala
+X-Diagnostic-Provider-Languages=vala
X-Formatter-Languages-Priority=100
-X-Highlighter-Languages=vala
+X-Formatter-Languages=vala
X-Highlighter-Languages-Priority=100
+X-Highlighter-Languages=vala
X-Hover-Provider-Languages=vala
+X-LSP-Command=vala-language-server
+X-LSP-Languages=vala;genie;
+X-LSP-Settings=settings.json
X-Rename-Provider-Languages=vala
X-Symbol-Resolver-Languages-Priority=100
X-Symbol-Resolver-Languages=vala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]