[gnome-builder/wip/chergert/lsp-plugin-loader: 21/24] plugins/lua-language-server: port to generic LSP plugin




commit 301ac47e7e164ada0ebad44c630e21f9db102c29
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 14 11:50:30 2022 -0500

    plugins/lua-language-server: port to generic LSP plugin

 .../gbp-lua-code-action-provider.c                 | 65 ----------------
 .../gbp-lua-code-action-provider.h                 | 31 --------
 .../gbp-lua-completion-provider.c                  | 61 ---------------
 .../gbp-lua-completion-provider.h                  | 31 --------
 .../gbp-lua-diagnostic-provider.c                  | 65 ----------------
 .../gbp-lua-diagnostic-provider.h                  | 31 --------
 .../lua-language-server/gbp-lua-formatter.c        | 65 ----------------
 .../lua-language-server/gbp-lua-formatter.h        | 31 --------
 .../lua-language-server/gbp-lua-highlighter.c      | 65 ----------------
 .../lua-language-server/gbp-lua-highlighter.h      | 31 --------
 .../lua-language-server/gbp-lua-hover-provider.c   | 66 ----------------
 .../lua-language-server/gbp-lua-hover-provider.h   | 31 --------
 .../lua-language-server/gbp-lua-rename-provider.c  | 65 ----------------
 .../lua-language-server/gbp-lua-rename-provider.h  | 31 --------
 src/plugins/lua-language-server/gbp-lua-service.c  | 89 ----------------------
 src/plugins/lua-language-server/gbp-lua-service.h  | 31 --------
 .../lua-language-server/gbp-lua-symbol-resolver.c  | 65 ----------------
 .../lua-language-server/gbp-lua-symbol-resolver.h  | 31 --------
 .../lua-language-server-plugin.c                   | 68 -----------------
 .../lua-language-server.gresource.xml              |  1 +
 .../lua-language-server/lua-language-server.plugin | 11 ++-
 src/plugins/lua-language-server/meson.build        | 13 ----
 src/plugins/lua-language-server/settings.json      |  4 +
 23 files changed, 12 insertions(+), 970 deletions(-)
---
diff --git a/src/plugins/lua-language-server/lua-language-server.gresource.xml 
b/src/plugins/lua-language-server/lua-language-server.gresource.xml
index 864a66d4b..d1dd7bac7 100644
--- a/src/plugins/lua-language-server/lua-language-server.gresource.xml
+++ b/src/plugins/lua-language-server/lua-language-server.gresource.xml
@@ -2,5 +2,6 @@
 <gresources>
   <gresource prefix="/plugins/lua-language-server">
     <file>lua-language-server.plugin</file>
+    <file>settings.json</file>
   </gresource>
 </gresources>
diff --git a/src/plugins/lua-language-server/lua-language-server.plugin 
b/src/plugins/lua-language-server/lua-language-server.plugin
index ed83b5bb3..08be7ed9e 100644
--- a/src/plugins/lua-language-server/lua-language-server.plugin
+++ b/src/plugins/lua-language-server/lua-language-server.plugin
@@ -2,15 +2,18 @@
 Builtin=true
 Copyright=Copyright © 2022 Christian Hergert
 Description=Provides integration with lua-language-server
-Embedded=_gbp_lua_register_types
+Embedded=ide_lsp_plugin_register_types
 Module=lua-language-server
 Name=Lua Language Server
 X-Category=lsps
+X-Code-Action-Languages=lua
 X-Completion-Provider-Languages=lua
-X-Symbol-Resolver-Languages=lua
 X-Diagnostic-Provider-Languages=lua
+X-Formatter-Languages=lua
 X-Highlighter-Languages=lua
 X-Hover-Provider-Languages=lua
+X-LSP-Command=lua-language-server
+X-LSP-Languages=lua
+X-LSP-Settings=settings.json
 X-Rename-Provider-Languages=lua
-X-Formatter-Languages=lua
-X-Code-Action-Languages=lua
+X-Symbol-Resolver-Languages=lua
diff --git a/src/plugins/lua-language-server/meson.build b/src/plugins/lua-language-server/meson.build
index 82d3dc62d..2138f2125 100644
--- a/src/plugins/lua-language-server/meson.build
+++ b/src/plugins/lua-language-server/meson.build
@@ -1,18 +1,5 @@
 if get_option('plugin_lua_language_server')
 
-plugins_sources += files([
-  'lua-language-server-plugin.c',
-  'gbp-lua-code-action-provider.c',
-  'gbp-lua-completion-provider.c',
-  'gbp-lua-diagnostic-provider.c',
-  'gbp-lua-formatter.c',
-  'gbp-lua-highlighter.c',
-  'gbp-lua-hover-provider.c',
-  'gbp-lua-rename-provider.c',
-  'gbp-lua-symbol-resolver.c',
-  'gbp-lua-service.c',
-])
-
 plugin_lua_resources = gnome.compile_resources(
   'lua-language-server-resources',
   'lua-language-server.gresource.xml',
diff --git a/src/plugins/lua-language-server/settings.json b/src/plugins/lua-language-server/settings.json
new file mode 100644
index 000000000..a8e9fdf08
--- /dev/null
+++ b/src/plugins/lua-language-server/settings.json
@@ -0,0 +1,4 @@
+{
+    "lua-language-server" : {
+    }
+}


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