[gnome-builder/wip/chergert/lsp-plugin-loader] plugins/jedi-language-server: port to dynamic LSP plugin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/lsp-plugin-loader] plugins/jedi-language-server: port to dynamic LSP plugin
- Date: Fri, 14 Oct 2022 02:42:59 +0000 (UTC)
commit 75d28a7fc71f95b6ee0f9c146e9c57d188ff0db8
Author: Christian Hergert <chergert redhat com>
Date: Thu Oct 13 21:36:05 2022 -0500
plugins/jedi-language-server: port to dynamic LSP plugin
.../gbp-jedi-code-action-provider.c | 65 -------------------
.../gbp-jedi-code-action-provider.h | 31 ----------
.../gbp-jedi-completion-provider.c | 61 ------------------
.../gbp-jedi-completion-provider.h | 31 ----------
.../gbp-jedi-diagnostic-provider.c | 65 -------------------
.../gbp-jedi-diagnostic-provider.h | 31 ----------
.../jedi-language-server/gbp-jedi-formatter.c | 65 -------------------
.../jedi-language-server/gbp-jedi-formatter.h | 31 ----------
.../jedi-language-server/gbp-jedi-highlighter.c | 65 -------------------
.../jedi-language-server/gbp-jedi-highlighter.h | 31 ----------
.../jedi-language-server/gbp-jedi-hover-provider.c | 66 --------------------
.../jedi-language-server/gbp-jedi-hover-provider.h | 31 ----------
.../gbp-jedi-rename-provider.c | 65 -------------------
.../gbp-jedi-rename-provider.h | 31 ----------
.../jedi-language-server/gbp-jedi-service.c | 72 ----------------------
.../jedi-language-server/gbp-jedi-service.h | 31 ----------
.../gbp-jedi-symbol-resolver.c | 65 -------------------
.../gbp-jedi-symbol-resolver.h | 31 ----------
.../jedi-language-server-plugin.c | 68 --------------------
.../jedi-language-server.gresource.xml | 1 +
.../jedi-language-server.plugin | 7 ++-
src/plugins/jedi-language-server/meson.build | 13 ----
src/plugins/jedi-language-server/settings.json | 7 +++
23 files changed, 13 insertions(+), 951 deletions(-)
---
diff --git a/src/plugins/jedi-language-server/jedi-language-server.gresource.xml
b/src/plugins/jedi-language-server/jedi-language-server.gresource.xml
index 7245d7665..9f0ae440f 100644
--- a/src/plugins/jedi-language-server/jedi-language-server.gresource.xml
+++ b/src/plugins/jedi-language-server/jedi-language-server.gresource.xml
@@ -2,5 +2,6 @@
<gresources>
<gresource prefix="/plugins/jedi-language-server">
<file>jedi-language-server.plugin</file>
+ <file>settings.json</file>
</gresource>
</gresources>
diff --git a/src/plugins/jedi-language-server/jedi-language-server.plugin
b/src/plugins/jedi-language-server/jedi-language-server.plugin
index a951a63ad..55d4754db 100644
--- a/src/plugins/jedi-language-server/jedi-language-server.plugin
+++ b/src/plugins/jedi-language-server/jedi-language-server.plugin
@@ -1,8 +1,8 @@
[Plugin]
Builtin=true
-Copyright=Copyright © 2021 Günther Wagner, Copyright © 2022 Christian Hergert
+Copyright=Copyright © 2022 Christian Hergert
Description=Provides integration with the jedi language server for Python
-Embedded=_gbp_jedi_register_types
+Embedded=ide_lsp_plugin_register_types
Module=jedi-language-server
Name=Python Language Server (Jedi)
X-Category=lsps
@@ -11,6 +11,9 @@ X-Symbol-Resolver-Languages=python,python3
X-Diagnostic-Provider-Languages=python,python3
X-Highlighter-Languages=python,python3
X-Hover-Provider-Languages=python,python3
+X-LSP-Command=jedi-language-server
+X-LSP-Languages=python
+X-LSP-Settings=settings.json
X-Rename-Provider-Languages=python,python3
X-Formatter-Languages=python,python3
X-Code-Action-Languages=python,python3
diff --git a/src/plugins/jedi-language-server/meson.build b/src/plugins/jedi-language-server/meson.build
index 4eae5dbc5..3702662fb 100644
--- a/src/plugins/jedi-language-server/meson.build
+++ b/src/plugins/jedi-language-server/meson.build
@@ -1,18 +1,5 @@
if get_option('plugin_jedi_language_server')
-plugins_sources += files([
- 'jedi-language-server-plugin.c',
- 'gbp-jedi-code-action-provider.c',
- 'gbp-jedi-completion-provider.c',
- 'gbp-jedi-diagnostic-provider.c',
- 'gbp-jedi-formatter.c',
- 'gbp-jedi-highlighter.c',
- 'gbp-jedi-hover-provider.c',
- 'gbp-jedi-rename-provider.c',
- 'gbp-jedi-symbol-resolver.c',
- 'gbp-jedi-service.c',
-])
-
plugin_jedi_resources = gnome.compile_resources(
'jedi-language-server-resources',
'jedi-language-server.gresource.xml',
diff --git a/src/plugins/jedi-language-server/settings.json b/src/plugins/jedi-language-server/settings.json
new file mode 100644
index 000000000..5066bf10c
--- /dev/null
+++ b/src/plugins/jedi-language-server/settings.json
@@ -0,0 +1,7 @@
+{
+ "jedi-language-server" : {
+ "initializationOptions" : {
+ "autoImportModules" : [ "gi" ]
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]