[gnome-builder/wip/gtk4-port: 1133/1774] plugins/vls: port vala-language-server plugin to C
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1133/1774] plugins/vls: port vala-language-server plugin to C
- Date: Mon, 11 Jul 2022 22:31:35 +0000 (UTC)
commit 8cd61cf5fb2158c2ea9af4bdb5c286035ece30d8
Author: Christian Hergert <chergert redhat com>
Date: Tue May 24 02:28:49 2022 -0700
plugins/vls: port vala-language-server plugin to C
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 | 75 +++++++++++++++++
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 | 83 +++++++++++++++++++
src/plugins/vls/gbp-vls-search-provider.h | 31 +++++++
src/plugins/vls/gbp-vls-service.c | 56 +++++++++++++
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 | 28 +++++--
src/plugins/vls/vala_langserv.py | 95 ----------------------
src/plugins/vls/vls-plugin.c | 73 +++++++++++++++++
src/plugins/vls/vls.gresource.xml | 6 ++
.../vls/{vala_langserv.plugin => vls.plugin} | 6 +-
25 files changed, 1081 insertions(+), 107 deletions(-)
---
diff --git a/src/plugins/vls/gbp-vls-code-action-provider.c b/src/plugins/vls/gbp-vls-code-action-provider.c
new file mode 100644
index 000000000..c8f381fcf
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-code-action-provider.c
@@ -0,0 +1,65 @@
+/* gbp-vls-code-action-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-code-action-provider"
+
+#include "config.h"
+
+#include "gbp-vls-code-action-provider.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsCodeActionProvider
+{
+ IdeLspCodeActionProvider parent_instance;
+};
+
+static void
+gbp_vls_code_action_provider_load (IdeCodeActionProvider *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_CODE_ACTION_PROVIDER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+code_action_provider_iface_init (IdeCodeActionProviderInterface *iface)
+{
+ iface->load = gbp_vls_code_action_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsCodeActionProvider, gbp_vls_code_action_provider,
IDE_TYPE_LSP_CODE_ACTION_PROVIDER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_CODE_ACTION_PROVIDER,
code_action_provider_iface_init))
+
+static void
+gbp_vls_code_action_provider_class_init (GbpVlsCodeActionProviderClass *klass)
+{
+}
+
+static void
+gbp_vls_code_action_provider_init (GbpVlsCodeActionProvider *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-code-action-provider.h b/src/plugins/vls/gbp-vls-code-action-provider.h
new file mode 100644
index 000000000..615256f92
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-code-action-provider.h
@@ -0,0 +1,31 @@
+/* gbp-vls-code-action-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_CODE_ACTION_PROVIDER (gbp_vls_code_action_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsCodeActionProvider, gbp_vls_code_action_provider, GBP, VLS_CODE_ACTION_PROVIDER,
IdeLspCodeActionProvider)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-completion-provider.c b/src/plugins/vls/gbp-vls-completion-provider.c
new file mode 100644
index 000000000..b0e346390
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-completion-provider.c
@@ -0,0 +1,75 @@
+/* gbp-vls-completion-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-completion-provider"
+
+#include "config.h"
+
+#include "gbp-vls-completion-provider.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsCompletionProvider
+{
+ IdeLspCompletionProvider parent_instance;
+};
+
+static void
+gbp_vls_completion_provider_load (IdeLspCompletionProvider *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_COMPLETION_PROVIDER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static int
+gbp_vls_completion_provider_get_priority (GtkSourceCompletionProvider *provider,
+ GtkSourceCompletionContext *context)
+{
+ return -1000;
+}
+
+static void
+completion_provider_iface_init (GtkSourceCompletionProviderInterface *iface)
+{
+ iface->get_priority = gbp_vls_completion_provider_get_priority;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsCompletionProvider, gbp_vls_completion_provider,
IDE_TYPE_LSP_COMPLETION_PROVIDER,
+ G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROVIDER,
completion_provider_iface_init))
+
+static void
+gbp_vls_completion_provider_class_init (GbpVlsCompletionProviderClass *klass)
+{
+ IdeLspCompletionProviderClass *lsp_completion_provider_class = IDE_LSP_COMPLETION_PROVIDER_CLASS (klass);
+
+ lsp_completion_provider_class->load = gbp_vls_completion_provider_load;
+}
+
+static void
+gbp_vls_completion_provider_init (GbpVlsCompletionProvider *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-completion-provider.h b/src/plugins/vls/gbp-vls-completion-provider.h
new file mode 100644
index 000000000..bc1aa018c
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-completion-provider.h
@@ -0,0 +1,31 @@
+/* gbp-vls-completion-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_COMPLETION_PROVIDER (gbp_vls_completion_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsCompletionProvider, gbp_vls_completion_provider, GBP, VLS_COMPLETION_PROVIDER,
IdeLspCompletionProvider)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-diagnostic-provider.c b/src/plugins/vls/gbp-vls-diagnostic-provider.c
new file mode 100644
index 000000000..e7f0296f5
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-diagnostic-provider.c
@@ -0,0 +1,65 @@
+/* gbp-vls-diagnostic-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-diagnostic-provider"
+
+#include "config.h"
+
+#include "gbp-vls-diagnostic-provider.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsDiagnosticProvider
+{
+ IdeLspDiagnosticProvider parent_instance;
+};
+
+static void
+gbp_vls_diagnostic_provider_load (IdeDiagnosticProvider *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_DIAGNOSTIC_PROVIDER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+diagnostic_provider_iface_init (IdeDiagnosticProviderInterface *iface)
+{
+ iface->load = gbp_vls_diagnostic_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsDiagnosticProvider, gbp_vls_diagnostic_provider,
IDE_TYPE_LSP_DIAGNOSTIC_PROVIDER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_DIAGNOSTIC_PROVIDER,
diagnostic_provider_iface_init))
+
+static void
+gbp_vls_diagnostic_provider_class_init (GbpVlsDiagnosticProviderClass *klass)
+{
+}
+
+static void
+gbp_vls_diagnostic_provider_init (GbpVlsDiagnosticProvider *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-diagnostic-provider.h b/src/plugins/vls/gbp-vls-diagnostic-provider.h
new file mode 100644
index 000000000..30b2fedfd
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-diagnostic-provider.h
@@ -0,0 +1,31 @@
+/* gbp-vls-diagnostic-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_DIAGNOSTIC_PROVIDER (gbp_vls_diagnostic_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsDiagnosticProvider, gbp_vls_diagnostic_provider, GBP, VLS_DIAGNOSTIC_PROVIDER,
IdeLspDiagnosticProvider)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-formatter.c b/src/plugins/vls/gbp-vls-formatter.c
new file mode 100644
index 000000000..4538da03a
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-formatter.c
@@ -0,0 +1,65 @@
+/* gbp-vls-formatter.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-formatter"
+
+#include "config.h"
+
+#include "gbp-vls-formatter.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsFormatter
+{
+ IdeLspFormatter parent_instance;
+};
+
+static void
+gbp_vls_formatter_load (IdeFormatter *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_FORMATTER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+formatter_iface_init (IdeFormatterInterface *iface)
+{
+ iface->load = gbp_vls_formatter_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsFormatter, gbp_vls_formatter, IDE_TYPE_LSP_FORMATTER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_FORMATTER, formatter_iface_init))
+
+static void
+gbp_vls_formatter_class_init (GbpVlsFormatterClass *klass)
+{
+}
+
+static void
+gbp_vls_formatter_init (GbpVlsFormatter *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-formatter.h b/src/plugins/vls/gbp-vls-formatter.h
new file mode 100644
index 000000000..c218a8d73
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-formatter.h
@@ -0,0 +1,31 @@
+/* gbp-vls-formatter.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_FORMATTER (gbp_vls_formatter_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsFormatter, gbp_vls_formatter, GBP, VLS_FORMATTER, IdeLspFormatter)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-highlighter.c b/src/plugins/vls/gbp-vls-highlighter.c
new file mode 100644
index 000000000..8d3d8c721
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-highlighter.c
@@ -0,0 +1,65 @@
+/* gbp-vls-highlighter.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-highlighter"
+
+#include "config.h"
+
+#include "gbp-vls-highlighter.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsHighlighter
+{
+ IdeLspHighlighter parent_instance;
+};
+
+static void
+gbp_vls_highlighter_load (IdeHighlighter *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_HIGHLIGHTER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+highlighter_iface_init (IdeHighlighterInterface *iface)
+{
+ iface->load = gbp_vls_highlighter_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsHighlighter, gbp_vls_highlighter, IDE_TYPE_LSP_HIGHLIGHTER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER, highlighter_iface_init))
+
+static void
+gbp_vls_highlighter_class_init (GbpVlsHighlighterClass *klass)
+{
+}
+
+static void
+gbp_vls_highlighter_init (GbpVlsHighlighter *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-highlighter.h b/src/plugins/vls/gbp-vls-highlighter.h
new file mode 100644
index 000000000..c2a0e56b0
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-highlighter.h
@@ -0,0 +1,31 @@
+/* gbp-vls-highlighter.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_HIGHLIGHTER (gbp_vls_highlighter_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsHighlighter, gbp_vls_highlighter, GBP, VLS_HIGHLIGHTER, IdeLspHighlighter)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-hover-provider.c b/src/plugins/vls/gbp-vls-hover-provider.c
new file mode 100644
index 000000000..1871fb9ff
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-hover-provider.c
@@ -0,0 +1,66 @@
+/* gbp-vls-hover-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-hover-provider"
+
+#include "config.h"
+
+#include "gbp-vls-hover-provider.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsHoverProvider
+{
+ IdeLspHoverProvider parent_instance;
+};
+
+static void
+gbp_vls_hover_provider_prepare (IdeLspHoverProvider *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_HOVER_PROVIDER (provider));
+
+ g_object_set (provider,
+ "category", "Vala",
+ "priority", 100,
+ NULL);
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+G_DEFINE_FINAL_TYPE (GbpVlsHoverProvider, gbp_vls_hover_provider, IDE_TYPE_LSP_HOVER_PROVIDER)
+
+static void
+gbp_vls_hover_provider_class_init (GbpVlsHoverProviderClass *klass)
+{
+ IdeLspHoverProviderClass *lsp_hover_provider_class = IDE_LSP_HOVER_PROVIDER_CLASS (klass);
+
+ lsp_hover_provider_class->prepare = gbp_vls_hover_provider_prepare;
+}
+
+static void
+gbp_vls_hover_provider_init (GbpVlsHoverProvider *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-hover-provider.h b/src/plugins/vls/gbp-vls-hover-provider.h
new file mode 100644
index 000000000..f69673304
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-hover-provider.h
@@ -0,0 +1,31 @@
+/* gbp-vls-hover-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_HOVER_PROVIDER (gbp_vls_hover_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsHoverProvider, gbp_vls_hover_provider, GBP, VLS_HOVER_PROVIDER,
IdeLspHoverProvider)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-rename-provider.c b/src/plugins/vls/gbp-vls-rename-provider.c
new file mode 100644
index 000000000..bee363330
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-rename-provider.c
@@ -0,0 +1,65 @@
+/* gbp-vls-rename-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-rename-provider"
+
+#include "config.h"
+
+#include "gbp-vls-rename-provider.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsRenameProvider
+{
+ IdeLspRenameProvider parent_instance;
+};
+
+static void
+gbp_vls_rename_provider_load (IdeRenameProvider *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_RENAME_PROVIDER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+rename_provider_iface_init (IdeRenameProviderInterface *iface)
+{
+ iface->load = gbp_vls_rename_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsRenameProvider, gbp_vls_rename_provider, IDE_TYPE_LSP_RENAME_PROVIDER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_RENAME_PROVIDER, rename_provider_iface_init))
+
+static void
+gbp_vls_rename_provider_class_init (GbpVlsRenameProviderClass *klass)
+{
+}
+
+static void
+gbp_vls_rename_provider_init (GbpVlsRenameProvider *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-rename-provider.h b/src/plugins/vls/gbp-vls-rename-provider.h
new file mode 100644
index 000000000..5bff3d715
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-rename-provider.h
@@ -0,0 +1,31 @@
+/* gbp-vls-rename-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_RENAME_PROVIDER (gbp_vls_rename_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsRenameProvider, gbp_vls_rename_provider, GBP, VLS_RENAME_PROVIDER,
IdeLspRenameProvider)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-search-provider.c b/src/plugins/vls/gbp-vls-search-provider.c
new file mode 100644
index 000000000..cd2fbe4b8
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-search-provider.c
@@ -0,0 +1,83 @@
+/* gbp-vls-search-provider.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-search-provider"
+
+#include "config.h"
+
+#include <libide-foundry.h>
+#include <libide-search.h>
+
+#include "gbp-vls-search-provider.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsSearchProvider
+{
+ IdeLspSearchProvider parent_instance;
+};
+
+static void
+gbp_vls_search_provider_load (IdeSearchProvider *provider,
+ IdeContext *context)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+ IdeBuildSystem *build_system;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_SEARCH_PROVIDER (provider));
+ g_assert (IDE_IS_CONTEXT (context));
+
+ if (!ide_context_has_project (context))
+ IDE_EXIT;
+
+ build_system = ide_build_system_from_context (context);
+
+ if (!ide_build_system_supports_language (build_system, "vala"))
+ {
+ g_debug ("%s does not advertise use of Vala in project. Searches will be ignored.",
+ G_OBJECT_TYPE_NAME (build_system));
+ IDE_EXIT;
+ }
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client_lazy (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+search_provider_iface_init (IdeSearchProviderInterface *iface)
+{
+ iface->load = gbp_vls_search_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsSearchProvider, gbp_vls_search_provider, IDE_TYPE_LSP_SEARCH_PROVIDER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_SEARCH_PROVIDER, search_provider_iface_init))
+
+static void
+gbp_vls_search_provider_class_init (GbpVlsSearchProviderClass *klass)
+{
+}
+
+static void
+gbp_vls_search_provider_init (GbpVlsSearchProvider *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-search-provider.h b/src/plugins/vls/gbp-vls-search-provider.h
new file mode 100644
index 000000000..9308af2b3
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-search-provider.h
@@ -0,0 +1,31 @@
+/* gbp-vls-search-provider.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_SEARCH_PROVIDER (gbp_vls_search_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsSearchProvider, gbp_vls_search_provider, GBP, VLS_SEARCH_PROVIDER,
IdeLspSearchProvider)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-service.c b/src/plugins/vls/gbp-vls-service.c
new file mode 100644
index 000000000..c549a513a
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-service.c
@@ -0,0 +1,56 @@
+/* gbp-vls-service.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-service"
+
+#include "config.h"
+
+#include "gbp-vls-service.h"
+
+struct _GbpVlsService
+{
+ IdeLspService parent_instance;
+};
+
+G_DEFINE_FINAL_TYPE (GbpVlsService, gbp_vls_service, IDE_TYPE_LSP_SERVICE)
+
+static void
+gbp_vls_service_configure_client (IdeLspService *service,
+ IdeLspClient *client)
+{
+ g_assert (GBP_IS_VLS_SERVICE (service));
+ g_assert (IDE_IS_LSP_CLIENT (client));
+
+ ide_lsp_client_add_language (client, "vala");
+}
+
+static void
+gbp_vls_service_class_init (GbpVlsServiceClass *klass)
+{
+ IdeLspServiceClass *lsp_service_class = IDE_LSP_SERVICE_CLASS (klass);
+
+ lsp_service_class->configure_client = gbp_vls_service_configure_client;
+}
+
+static void
+gbp_vls_service_init (GbpVlsService *self)
+{
+ ide_lsp_service_set_program (IDE_LSP_SERVICE (self), "vala-language-server");
+}
diff --git a/src/plugins/vls/gbp-vls-service.h b/src/plugins/vls/gbp-vls-service.h
new file mode 100644
index 000000000..a4987e58b
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-service.h
@@ -0,0 +1,31 @@
+/* gbp-vls-service.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_SERVICE (gbp_vls_service_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsService, gbp_vls_service, GBP, VLS_SERVICE, IdeLspService)
+
+G_END_DECLS
diff --git a/src/plugins/vls/gbp-vls-symbol-resolver.c b/src/plugins/vls/gbp-vls-symbol-resolver.c
new file mode 100644
index 000000000..b7a32592b
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-symbol-resolver.c
@@ -0,0 +1,65 @@
+/* gbp-vls-symbol-resolver.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-vls-symbol-resolver"
+
+#include "config.h"
+
+#include "gbp-vls-symbol-resolver.h"
+#include "gbp-vls-service.h"
+
+struct _GbpVlsSymbolResolver
+{
+ IdeLspSymbolResolver parent_instance;
+};
+
+static void
+gbp_vls_symbol_provider_load (IdeSymbolResolver *provider)
+{
+ g_autoptr(IdeLspServiceClass) klass = NULL;
+
+ IDE_ENTRY;
+
+ g_assert (GBP_IS_VLS_SYMBOL_RESOLVER (provider));
+
+ klass = g_type_class_ref (GBP_TYPE_VLS_SERVICE);
+ ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+ IDE_EXIT;
+}
+
+static void
+symbol_provider_iface_init (IdeSymbolResolverInterface *iface)
+{
+ iface->load = gbp_vls_symbol_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpVlsSymbolResolver, gbp_vls_symbol_provider, IDE_TYPE_LSP_SYMBOL_RESOLVER,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_SYMBOL_RESOLVER, symbol_provider_iface_init))
+
+static void
+gbp_vls_symbol_provider_class_init (GbpVlsSymbolResolverClass *klass)
+{
+}
+
+static void
+gbp_vls_symbol_provider_init (GbpVlsSymbolResolver *self)
+{
+}
diff --git a/src/plugins/vls/gbp-vls-symbol-resolver.h b/src/plugins/vls/gbp-vls-symbol-resolver.h
new file mode 100644
index 000000000..aa770f579
--- /dev/null
+++ b/src/plugins/vls/gbp-vls-symbol-resolver.h
@@ -0,0 +1,31 @@
+/* gbp-vls-symbol-resolver.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-lsp.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_VLS_SYMBOL_RESOLVER (gbp_vls_symbol_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpVlsSymbolResolver, gbp_vls_symbol_provider, GBP, VLS_SYMBOL_RESOLVER,
IdeLspSymbolResolver)
+
+G_END_DECLS
diff --git a/src/plugins/vls/meson.build b/src/plugins/vls/meson.build
index 064a90ad3..4d46f5b5b 100644
--- a/src/plugins/vls/meson.build
+++ b/src/plugins/vls/meson.build
@@ -1,13 +1,25 @@
if get_option('plugin_vls')
-install_data('vala_langserv.py', install_dir: plugindir)
-
-configure_file(
- input: 'vala_langserv.plugin',
- output: 'vala_langserv.plugin',
- configuration: config_h,
- install: true,
- install_dir: plugindir,
+plugins_sources += files([
+ 'vls-plugin.c',
+ 'gbp-vls-code-action-provider.c',
+ 'gbp-vls-completion-provider.c',
+ 'gbp-vls-diagnostic-provider.c',
+ 'gbp-vls-formatter.c',
+ 'gbp-vls-highlighter.c',
+ 'gbp-vls-hover-provider.c',
+ 'gbp-vls-rename-provider.c',
+ 'gbp-vls-search-provider.c',
+ 'gbp-vls-symbol-resolver.c',
+ 'gbp-vls-service.c',
+])
+
+plugin_vls_resources = gnome.compile_resources(
+ 'vls-resources',
+ 'vls.gresource.xml',
+ c_name: 'gbp_vls',
)
+plugins_sources += plugin_vls_resources
+
endif
diff --git a/src/plugins/vls/vls-plugin.c b/src/plugins/vls/vls-plugin.c
new file mode 100644
index 000000000..3dabe530a
--- /dev/null
+++ b/src/plugins/vls/vls-plugin.c
@@ -0,0 +1,73 @@
+/* vls-plugin.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "vls-plugin"
+
+#include "config.h"
+
+#include <libpeas/peas.h>
+
+#include <libide-code.h>
+#include <libide-foundry.h>
+#include <libide-lsp.h>
+#include <libide-search.h>
+
+#include "gbp-vls-code-action-provider.h"
+#include "gbp-vls-completion-provider.h"
+#include "gbp-vls-diagnostic-provider.h"
+#include "gbp-vls-formatter.h"
+#include "gbp-vls-highlighter.h"
+#include "gbp-vls-hover-provider.h"
+#include "gbp-vls-rename-provider.h"
+#include "gbp-vls-search-provider.h"
+#include "gbp-vls-service.h"
+#include "gbp-vls-symbol-resolver.h"
+
+_IDE_EXTERN void
+_gbp_vls_register_types (PeasObjectModule *module)
+{
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_DIAGNOSTIC_PROVIDER,
+ GBP_TYPE_VLS_DIAGNOSTIC_PROVIDER);
+ peas_object_module_register_extension_type (module,
+ GTK_SOURCE_TYPE_COMPLETION_PROVIDER,
+ GBP_TYPE_VLS_COMPLETION_PROVIDER);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_SYMBOL_RESOLVER,
+ GBP_TYPE_VLS_SYMBOL_RESOLVER);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_HIGHLIGHTER,
+ GBP_TYPE_VLS_HIGHLIGHTER);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_FORMATTER,
+ GBP_TYPE_VLS_FORMATTER);
+ peas_object_module_register_extension_type (module,
+ GTK_SOURCE_TYPE_HOVER_PROVIDER,
+ GBP_TYPE_VLS_HOVER_PROVIDER);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_RENAME_PROVIDER,
+ GBP_TYPE_VLS_RENAME_PROVIDER);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_CODE_ACTION_PROVIDER,
+ GBP_TYPE_VLS_CODE_ACTION_PROVIDER);
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_SEARCH_PROVIDER,
+ GBP_TYPE_VLS_SEARCH_PROVIDER);
+}
diff --git a/src/plugins/vls/vls.gresource.xml b/src/plugins/vls/vls.gresource.xml
new file mode 100644
index 000000000..a79126678
--- /dev/null
+++ b/src/plugins/vls/vls.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/plugins/vls">
+ <file>vls.plugin</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/vls/vala_langserv.plugin b/src/plugins/vls/vls.plugin
similarity index 89%
rename from src/plugins/vls/vala_langserv.plugin
rename to src/plugins/vls/vls.plugin
index f988e41ec..78f6faf18 100644
--- a/src/plugins/vls/vala_langserv.plugin
+++ b/src/plugins/vls/vls.plugin
@@ -3,10 +3,8 @@ Name=Vala Language Server
Description=Vala code intelligence provided by VLS.
Authors=Princeton Ferro, Ben Iofel
Copyright=Copyright © 2020
-
-Loader=python3
-Module=vala_langserv
-X-Builder-ABI=@PACKAGE_ABI@
+Module=vls
+Embedded=_gbp_vls_register_types
X-Category=lsps
X-Code-Action-Languages=vala
X-Completion-Provider-Languages=vala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]