[gnome-builder] plugins/intelephense: port to C



commit be77f75addb569cb1a7b8c8b82f24bb48d819e02
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 11 22:55:53 2022 -0700

    plugins/intelephense: port to C

 .../gbp-intelephense-code-action-provider.c        |  65 ++++++++
 .../gbp-intelephense-code-action-provider.h        |  31 ++++
 .../gbp-intelephense-completion-provider.c         |  75 +++++++++
 .../gbp-intelephense-completion-provider.h         |  31 ++++
 .../gbp-intelephense-diagnostic-provider.c         |  65 ++++++++
 .../gbp-intelephense-diagnostic-provider.h         |  31 ++++
 .../intelephense/gbp-intelephense-formatter.c      |  65 ++++++++
 .../intelephense/gbp-intelephense-formatter.h      |  31 ++++
 .../intelephense/gbp-intelephense-highlighter.c    |  65 ++++++++
 .../intelephense/gbp-intelephense-highlighter.h    |  31 ++++
 .../intelephense/gbp-intelephense-hover-provider.c |  66 ++++++++
 .../intelephense/gbp-intelephense-hover-provider.h |  31 ++++
 .../gbp-intelephense-rename-provider.c             |  65 ++++++++
 .../gbp-intelephense-rename-provider.h             |  31 ++++
 .../intelephense/gbp-intelephense-service.c        | 185 +++++++++++++++++++++
 .../intelephense/gbp-intelephense-service.h        |  31 ++++
 .../gbp-intelephense-symbol-resolver.c             |  65 ++++++++
 .../gbp-intelephense-symbol-resolver.h             |  31 ++++
 src/plugins/intelephense/intelephense-plugin.c     |  68 ++++++++
 .../intelephense/intelephense.gresource.xml        |   6 +
 src/plugins/intelephense/intelephense.plugin       |   8 +-
 src/plugins/intelephense/intelephense.py           | 176 --------------------
 src/plugins/intelephense/meson.build               |  27 ++-
 23 files changed, 1092 insertions(+), 188 deletions(-)
---
diff --git a/src/plugins/intelephense/gbp-intelephense-code-action-provider.c 
b/src/plugins/intelephense/gbp-intelephense-code-action-provider.c
new file mode 100644
index 000000000..d6ee05fc6
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-code-action-provider.c
@@ -0,0 +1,65 @@
+/* gbp-intelephense-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-intelephense-code-action-provider"
+
+#include "config.h"
+
+#include "gbp-intelephense-code-action-provider.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseCodeActionProvider
+{
+  IdeLspCodeActionProvider parent_instance;
+};
+
+static void
+gbp_intelephense_code_action_provider_load (IdeCodeActionProvider *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_CODE_ACTION_PROVIDER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_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_intelephense_code_action_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseCodeActionProvider, gbp_intelephense_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_intelephense_code_action_provider_class_init (GbpIntelephenseCodeActionProviderClass *klass)
+{
+}
+
+static void
+gbp_intelephense_code_action_provider_init (GbpIntelephenseCodeActionProvider *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-code-action-provider.h 
b/src/plugins/intelephense/gbp-intelephense-code-action-provider.h
new file mode 100644
index 000000000..406d5d96d
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-code-action-provider.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_CODE_ACTION_PROVIDER (gbp_intelephense_code_action_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseCodeActionProvider, gbp_intelephense_code_action_provider, GBP, 
INTELEPHENSE_CODE_ACTION_PROVIDER, IdeLspCodeActionProvider)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-completion-provider.c 
b/src/plugins/intelephense/gbp-intelephense-completion-provider.c
new file mode 100644
index 000000000..b08d74f18
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-completion-provider.c
@@ -0,0 +1,75 @@
+/* gbp-intelephense-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-intelephense-completion-provider"
+
+#include "config.h"
+
+#include "gbp-intelephense-completion-provider.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseCompletionProvider
+{
+  IdeLspCompletionProvider parent_instance;
+};
+
+static void
+gbp_intelephense_completion_provider_load (IdeLspCompletionProvider *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_COMPLETION_PROVIDER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+static int
+gbp_intelephense_completion_provider_get_priority (GtkSourceCompletionProvider *provider,
+                                                   GtkSourceCompletionContext  *context)
+{
+  return -1000;
+}
+
+static void
+completion_provider_iface_init (GtkSourceCompletionProviderInterface *iface)
+{
+  iface->get_priority = gbp_intelephense_completion_provider_get_priority;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseCompletionProvider, gbp_intelephense_completion_provider, 
IDE_TYPE_LSP_COMPLETION_PROVIDER,
+                               G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROVIDER, 
completion_provider_iface_init))
+
+static void
+gbp_intelephense_completion_provider_class_init (GbpIntelephenseCompletionProviderClass *klass)
+{
+  IdeLspCompletionProviderClass *lsp_completion_provider_class = IDE_LSP_COMPLETION_PROVIDER_CLASS (klass);
+
+  lsp_completion_provider_class->load = gbp_intelephense_completion_provider_load;
+}
+
+static void
+gbp_intelephense_completion_provider_init (GbpIntelephenseCompletionProvider *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-completion-provider.h 
b/src/plugins/intelephense/gbp-intelephense-completion-provider.h
new file mode 100644
index 000000000..7816b5b3b
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-completion-provider.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_COMPLETION_PROVIDER (gbp_intelephense_completion_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseCompletionProvider, gbp_intelephense_completion_provider, GBP, 
INTELEPHENSE_COMPLETION_PROVIDER, IdeLspCompletionProvider)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-diagnostic-provider.c 
b/src/plugins/intelephense/gbp-intelephense-diagnostic-provider.c
new file mode 100644
index 000000000..17bca922b
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-diagnostic-provider.c
@@ -0,0 +1,65 @@
+/* gbp-intelephense-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-intelephense-diagnostic-provider"
+
+#include "config.h"
+
+#include "gbp-intelephense-diagnostic-provider.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseDiagnosticProvider
+{
+  IdeLspDiagnosticProvider parent_instance;
+};
+
+static void
+gbp_intelephense_diagnostic_provider_load (IdeDiagnosticProvider *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_DIAGNOSTIC_PROVIDER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+static void
+diagnostic_provider_iface_init (IdeDiagnosticProviderInterface *iface)
+{
+  iface->load = gbp_intelephense_diagnostic_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseDiagnosticProvider, gbp_intelephense_diagnostic_provider, 
IDE_TYPE_LSP_DIAGNOSTIC_PROVIDER,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_DIAGNOSTIC_PROVIDER, 
diagnostic_provider_iface_init))
+
+static void
+gbp_intelephense_diagnostic_provider_class_init (GbpIntelephenseDiagnosticProviderClass *klass)
+{
+}
+
+static void
+gbp_intelephense_diagnostic_provider_init (GbpIntelephenseDiagnosticProvider *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-diagnostic-provider.h 
b/src/plugins/intelephense/gbp-intelephense-diagnostic-provider.h
new file mode 100644
index 000000000..32d23405f
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-diagnostic-provider.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_DIAGNOSTIC_PROVIDER (gbp_intelephense_diagnostic_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseDiagnosticProvider, gbp_intelephense_diagnostic_provider, GBP, 
INTELEPHENSE_DIAGNOSTIC_PROVIDER, IdeLspDiagnosticProvider)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-formatter.c 
b/src/plugins/intelephense/gbp-intelephense-formatter.c
new file mode 100644
index 000000000..84e141537
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-formatter.c
@@ -0,0 +1,65 @@
+/* gbp-intelephense-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-intelephense-formatter"
+
+#include "config.h"
+
+#include "gbp-intelephense-formatter.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseFormatter
+{
+  IdeLspFormatter parent_instance;
+};
+
+static void
+gbp_intelephense_formatter_load (IdeFormatter *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_FORMATTER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+static void
+formatter_iface_init (IdeFormatterInterface *iface)
+{
+  iface->load = gbp_intelephense_formatter_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseFormatter, gbp_intelephense_formatter, IDE_TYPE_LSP_FORMATTER,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_FORMATTER, formatter_iface_init))
+
+static void
+gbp_intelephense_formatter_class_init (GbpIntelephenseFormatterClass *klass)
+{
+}
+
+static void
+gbp_intelephense_formatter_init (GbpIntelephenseFormatter *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-formatter.h 
b/src/plugins/intelephense/gbp-intelephense-formatter.h
new file mode 100644
index 000000000..458ead235
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-formatter.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_FORMATTER (gbp_intelephense_formatter_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseFormatter, gbp_intelephense_formatter, GBP, INTELEPHENSE_FORMATTER, 
IdeLspFormatter)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-highlighter.c 
b/src/plugins/intelephense/gbp-intelephense-highlighter.c
new file mode 100644
index 000000000..dc94789f6
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-highlighter.c
@@ -0,0 +1,65 @@
+/* gbp-intelephense-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-intelephense-highlighter"
+
+#include "config.h"
+
+#include "gbp-intelephense-highlighter.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseHighlighter
+{
+  IdeLspHighlighter parent_instance;
+};
+
+static void
+gbp_intelephense_highlighter_load (IdeHighlighter *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_HIGHLIGHTER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+static void
+highlighter_iface_init (IdeHighlighterInterface *iface)
+{
+  iface->load = gbp_intelephense_highlighter_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseHighlighter, gbp_intelephense_highlighter, 
IDE_TYPE_LSP_HIGHLIGHTER,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER, highlighter_iface_init))
+
+static void
+gbp_intelephense_highlighter_class_init (GbpIntelephenseHighlighterClass *klass)
+{
+}
+
+static void
+gbp_intelephense_highlighter_init (GbpIntelephenseHighlighter *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-highlighter.h 
b/src/plugins/intelephense/gbp-intelephense-highlighter.h
new file mode 100644
index 000000000..aa1237ea8
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-highlighter.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_HIGHLIGHTER (gbp_intelephense_highlighter_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseHighlighter, gbp_intelephense_highlighter, GBP, 
INTELEPHENSE_HIGHLIGHTER, IdeLspHighlighter)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-hover-provider.c 
b/src/plugins/intelephense/gbp-intelephense-hover-provider.c
new file mode 100644
index 000000000..3a3fb3591
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-hover-provider.c
@@ -0,0 +1,66 @@
+/* gbp-intelephense-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-intelephense-hover-provider"
+
+#include "config.h"
+
+#include "gbp-intelephense-hover-provider.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseHoverProvider
+{
+  IdeLspHoverProvider parent_instance;
+};
+
+static void
+gbp_intelephense_hover_provider_prepare (IdeLspHoverProvider *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_HOVER_PROVIDER (provider));
+
+  g_object_set (provider,
+                "category", "PHP",
+                "priority", 300,
+                NULL);
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+G_DEFINE_FINAL_TYPE (GbpIntelephenseHoverProvider, gbp_intelephense_hover_provider, 
IDE_TYPE_LSP_HOVER_PROVIDER)
+
+static void
+gbp_intelephense_hover_provider_class_init (GbpIntelephenseHoverProviderClass *klass)
+{
+  IdeLspHoverProviderClass *lsp_hover_provider_class = IDE_LSP_HOVER_PROVIDER_CLASS (klass);
+
+  lsp_hover_provider_class->prepare = gbp_intelephense_hover_provider_prepare;
+}
+
+static void
+gbp_intelephense_hover_provider_init (GbpIntelephenseHoverProvider *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-hover-provider.h 
b/src/plugins/intelephense/gbp-intelephense-hover-provider.h
new file mode 100644
index 000000000..c8ea57940
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-hover-provider.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_HOVER_PROVIDER (gbp_intelephense_hover_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseHoverProvider, gbp_intelephense_hover_provider, GBP, 
INTELEPHENSE_HOVER_PROVIDER, IdeLspHoverProvider)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-rename-provider.c 
b/src/plugins/intelephense/gbp-intelephense-rename-provider.c
new file mode 100644
index 000000000..3c0c408bd
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-rename-provider.c
@@ -0,0 +1,65 @@
+/* gbp-intelephense-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-intelephense-rename-provider"
+
+#include "config.h"
+
+#include "gbp-intelephense-rename-provider.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseRenameProvider
+{
+  IdeLspRenameProvider parent_instance;
+};
+
+static void
+gbp_intelephense_rename_provider_load (IdeRenameProvider *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_RENAME_PROVIDER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+static void
+rename_provider_iface_init (IdeRenameProviderInterface *iface)
+{
+  iface->load = gbp_intelephense_rename_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseRenameProvider, gbp_intelephense_rename_provider, 
IDE_TYPE_LSP_RENAME_PROVIDER,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_RENAME_PROVIDER, rename_provider_iface_init))
+
+static void
+gbp_intelephense_rename_provider_class_init (GbpIntelephenseRenameProviderClass *klass)
+{
+}
+
+static void
+gbp_intelephense_rename_provider_init (GbpIntelephenseRenameProvider *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-rename-provider.h 
b/src/plugins/intelephense/gbp-intelephense-rename-provider.h
new file mode 100644
index 000000000..f12dbf4af
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-rename-provider.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_RENAME_PROVIDER (gbp_intelephense_rename_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseRenameProvider, gbp_intelephense_rename_provider, GBP, 
INTELEPHENSE_RENAME_PROVIDER, IdeLspRenameProvider)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-service.c 
b/src/plugins/intelephense/gbp-intelephense-service.c
new file mode 100644
index 000000000..1ff9f262d
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-service.c
@@ -0,0 +1,185 @@
+/* gbp-intelephense-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-intelephense-service"
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <jsonrpc-glib.h>
+
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseService
+{
+  IdeLspService    parent_instance;
+  IdeNotification *notif;
+};
+
+G_DEFINE_FINAL_TYPE (GbpIntelephenseService, gbp_intelephense_service, IDE_TYPE_LSP_SERVICE)
+
+static GVariant *
+gbp_intelephense_service_client_load_configuration_cb (GbpIntelephenseService *self,
+                                                       IdeLspClient           *client)
+{
+  GVariant *ret;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_SERVICE (self));
+  g_assert (IDE_IS_LSP_CLIENT (client));
+
+  ret = JSONRPC_MESSAGE_NEW (
+    "intelephense", "{",
+      "files", "{",
+        "associations", "[", "*.php", "*.phtml", "]",
+        "exclude", "[", "]",
+      "}",
+      "completion", "{",
+        "insertUseDeclaration", JSONRPC_MESSAGE_PUT_BOOLEAN (TRUE),
+        "fullyQualifyGlobalConstantsAndFunctions", JSONRPC_MESSAGE_PUT_BOOLEAN (FALSE),
+        "triggerParameterHints", JSONRPC_MESSAGE_PUT_BOOLEAN (TRUE),
+        "maxItems", JSONRPC_MESSAGE_PUT_INT32 (100),
+      "}",
+      "format", "{",
+        "enable", JSONRPC_MESSAGE_PUT_BOOLEAN (TRUE),
+      "}",
+    "}"
+  );
+
+  IDE_RETURN (ret);
+}
+
+static void
+clear_notification (GbpIntelephenseService *self)
+{
+  g_assert (GBP_IS_INTELEPHENSE_SERVICE (self));
+
+  if (self->notif == NULL)
+    return;
+
+  ide_notification_withdraw (self->notif);
+  g_clear_object (&self->notif);
+}
+
+static void
+gbp_intelephense_service_client_notification_cb (GbpIntelephenseService *self,
+                                                 const char             *method,
+                                                 GVariant               *params,
+                                                 IdeLspClient           *client)
+{
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_SERVICE (self));
+  g_assert (method != NULL);
+
+  if (ide_str_equal0 (method, "indexingStarted"))
+    {
+      clear_notification (self);
+      self->notif = g_object_new (IDE_TYPE_NOTIFICATION,
+                                  "id", "org.gnome.builder.intelephense.indexing",
+                                  "title", "Intelephense",
+                                  "body", _("Indexing PHP code"),
+                                  "has-progress", TRUE,
+                                  "progress-is-imprecise", TRUE,
+                                  NULL);
+      ide_notification_attach (self->notif, IDE_OBJECT (self));
+    }
+  else if (ide_str_equal0 (method, "indexingEnded"))
+    {
+      clear_notification (self);
+    }
+
+  IDE_EXIT;
+}
+
+static void
+gbp_intelephense_service_configure_client (IdeLspService *service,
+                                           IdeLspClient  *client)
+{
+  GbpIntelephenseService *self = (GbpIntelephenseService *)service;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_SERVICE (self));
+  g_assert (IDE_IS_LSP_CLIENT (client));
+
+  ide_lsp_client_add_language (client, "php");
+
+  g_signal_connect_object (client,
+                           "load-configuration",
+                           G_CALLBACK (gbp_intelephense_service_client_load_configuration_cb),
+                           self,
+                           G_CONNECT_SWAPPED);
+
+  g_signal_connect_object (client,
+                           "notification",
+                           G_CALLBACK (gbp_intelephense_service_client_notification_cb),
+                           self,
+                           G_CONNECT_SWAPPED);
+
+  IDE_EXIT;
+}
+
+static void
+gbp_intelephense_service_configure_launcher (IdeLspService         *service,
+                                             IdePipeline           *pipeline,
+                                             IdeSubprocessLauncher *launcher)
+{
+  IDE_ENTRY;
+
+  g_assert (IDE_IS_LSP_SERVICE (service));
+  g_assert (IDE_IS_PIPELINE (pipeline));
+  g_assert (IDE_IS_SUBPROCESS_LAUNCHER (launcher));
+
+  ide_subprocess_launcher_push_argv (launcher, "--stdio");
+  ide_subprocess_launcher_append_path (launcher, "/app/bin");
+
+  IDE_EXIT;
+}
+
+static void
+gbp_intelephense_service_dispose (GObject *object)
+{
+  GbpIntelephenseService *self = (GbpIntelephenseService *)object;
+
+  clear_notification (self);
+
+  G_OBJECT_CLASS (gbp_intelephense_service_parent_class)->dispose (object);
+}
+
+static void
+gbp_intelephense_service_class_init (GbpIntelephenseServiceClass *klass)
+{
+  IdeLspServiceClass *lsp_service_class = IDE_LSP_SERVICE_CLASS (klass);
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->dispose = gbp_intelephense_service_dispose;
+
+  lsp_service_class->configure_client = gbp_intelephense_service_configure_client;
+  lsp_service_class->configure_launcher = gbp_intelephense_service_configure_launcher;
+}
+
+static void
+gbp_intelephense_service_init (GbpIntelephenseService *self)
+{
+  ide_lsp_service_set_program (IDE_LSP_SERVICE (self), "intelephense");
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-service.h 
b/src/plugins/intelephense/gbp-intelephense-service.h
new file mode 100644
index 000000000..55691e195
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-service.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_SERVICE (gbp_intelephense_service_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseService, gbp_intelephense_service, GBP, INTELEPHENSE_SERVICE, 
IdeLspService)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/gbp-intelephense-symbol-resolver.c 
b/src/plugins/intelephense/gbp-intelephense-symbol-resolver.c
new file mode 100644
index 000000000..ac78416ba
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-symbol-resolver.c
@@ -0,0 +1,65 @@
+/* gbp-intelephense-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-intelephense-symbol-resolver"
+
+#include "config.h"
+
+#include "gbp-intelephense-symbol-resolver.h"
+#include "gbp-intelephense-service.h"
+
+struct _GbpIntelephenseSymbolResolver
+{
+  IdeLspSymbolResolver parent_instance;
+};
+
+static void
+gbp_intelephense_symbol_provider_load (IdeSymbolResolver *provider)
+{
+  g_autoptr(IdeLspServiceClass) klass = NULL;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_INTELEPHENSE_SYMBOL_RESOLVER (provider));
+
+  klass = g_type_class_ref (GBP_TYPE_INTELEPHENSE_SERVICE);
+  ide_lsp_service_class_bind_client (klass, IDE_OBJECT (provider));
+
+  IDE_EXIT;
+}
+
+static void
+symbol_provider_iface_init (IdeSymbolResolverInterface *iface)
+{
+  iface->load = gbp_intelephense_symbol_provider_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpIntelephenseSymbolResolver, gbp_intelephense_symbol_provider, 
IDE_TYPE_LSP_SYMBOL_RESOLVER,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_SYMBOL_RESOLVER, symbol_provider_iface_init))
+
+static void
+gbp_intelephense_symbol_provider_class_init (GbpIntelephenseSymbolResolverClass *klass)
+{
+}
+
+static void
+gbp_intelephense_symbol_provider_init (GbpIntelephenseSymbolResolver *self)
+{
+}
diff --git a/src/plugins/intelephense/gbp-intelephense-symbol-resolver.h 
b/src/plugins/intelephense/gbp-intelephense-symbol-resolver.h
new file mode 100644
index 000000000..e17035f62
--- /dev/null
+++ b/src/plugins/intelephense/gbp-intelephense-symbol-resolver.h
@@ -0,0 +1,31 @@
+/* gbp-intelephense-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_INTELEPHENSE_SYMBOL_RESOLVER (gbp_intelephense_symbol_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpIntelephenseSymbolResolver, gbp_intelephense_symbol_provider, GBP, 
INTELEPHENSE_SYMBOL_RESOLVER, IdeLspSymbolResolver)
+
+G_END_DECLS
diff --git a/src/plugins/intelephense/intelephense-plugin.c b/src/plugins/intelephense/intelephense-plugin.c
new file mode 100644
index 000000000..52c4c5fda
--- /dev/null
+++ b/src/plugins/intelephense/intelephense-plugin.c
@@ -0,0 +1,68 @@
+/* intelephense-language-server-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 "intelephense-plugin"
+
+#include "config.h"
+
+#include <libpeas/peas.h>
+
+#include <libide-code.h>
+#include <libide-foundry.h>
+#include <libide-lsp.h>
+
+#include "gbp-intelephense-service.h"
+#include "gbp-intelephense-completion-provider.h"
+#include "gbp-intelephense-diagnostic-provider.h"
+#include "gbp-intelephense-symbol-resolver.h"
+#include "gbp-intelephense-highlighter.h"
+#include "gbp-intelephense-formatter.h"
+#include "gbp-intelephense-rename-provider.h"
+#include "gbp-intelephense-hover-provider.h"
+#include "gbp-intelephense-code-action-provider.h"
+
+_IDE_EXTERN void
+_gbp_intelephense_register_types (PeasObjectModule *module)
+{
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_DIAGNOSTIC_PROVIDER,
+                                              GBP_TYPE_INTELEPHENSE_DIAGNOSTIC_PROVIDER);
+  peas_object_module_register_extension_type (module,
+                                              GTK_SOURCE_TYPE_COMPLETION_PROVIDER,
+                                              GBP_TYPE_INTELEPHENSE_COMPLETION_PROVIDER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_SYMBOL_RESOLVER,
+                                              GBP_TYPE_INTELEPHENSE_SYMBOL_RESOLVER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_HIGHLIGHTER,
+                                              GBP_TYPE_INTELEPHENSE_HIGHLIGHTER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_FORMATTER,
+                                              GBP_TYPE_INTELEPHENSE_FORMATTER);
+  peas_object_module_register_extension_type (module,
+                                              GTK_SOURCE_TYPE_HOVER_PROVIDER,
+                                              GBP_TYPE_INTELEPHENSE_HOVER_PROVIDER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_RENAME_PROVIDER,
+                                              GBP_TYPE_INTELEPHENSE_RENAME_PROVIDER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_CODE_ACTION_PROVIDER,
+                                              GBP_TYPE_INTELEPHENSE_CODE_ACTION_PROVIDER);
+}
diff --git a/src/plugins/intelephense/intelephense.gresource.xml 
b/src/plugins/intelephense/intelephense.gresource.xml
new file mode 100644
index 000000000..ddee34ddc
--- /dev/null
+++ b/src/plugins/intelephense/intelephense.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/plugins/intelephense">
+    <file>intelephense.plugin</file>
+  </gresource>
+</gresources>
diff --git a/src/plugins/intelephense/intelephense.plugin b/src/plugins/intelephense/intelephense.plugin
index 45a118a17..6a2184cdb 100644
--- a/src/plugins/intelephense/intelephense.plugin
+++ b/src/plugins/intelephense/intelephense.plugin
@@ -1,11 +1,11 @@
 [Plugin]
 Builtin=true
-Name=Intelephense LSP plugin
-Description=Provides a Language Server Protocol implementation for PHP.
-Loader=python3
+Name=PHP Language Server
+Description=Provides integration with the intelephense language server for PHP
+Embedded=_gbp_intelephense_register_types
 Module=intelephense
 Author=Peter Maatman <blackwolf12333 gmail com>
-X-Builder-ABI=@PACKAGE_ABI@
+X-Category=lsps
 X-Completion-Provider-Languages=php
 X-Symbol-Resolver-Languages=php
 X-Diagnostic-Provider-Languages=php
diff --git a/src/plugins/intelephense/meson.build b/src/plugins/intelephense/meson.build
index d04fe8cb4..241893dab 100644
--- a/src/plugins/intelephense/meson.build
+++ b/src/plugins/intelephense/meson.build
@@ -1,13 +1,24 @@
 if get_option('plugin_intelephense')
 
-install_data('intelephense.py', install_dir: plugindir)
-
-configure_file(
-          input: 'intelephense.plugin',
-         output: 'intelephense.plugin',
-  configuration: config_h,
-        install: true,
-    install_dir: plugindir,
+plugins_sources += files([
+  'intelephense-plugin.c',
+  'gbp-intelephense-code-action-provider.c',
+  'gbp-intelephense-completion-provider.c',
+  'gbp-intelephense-diagnostic-provider.c',
+  'gbp-intelephense-formatter.c',
+  'gbp-intelephense-highlighter.c',
+  'gbp-intelephense-hover-provider.c',
+  'gbp-intelephense-rename-provider.c',
+  'gbp-intelephense-symbol-resolver.c',
+  'gbp-intelephense-service.c',
+])
+
+plugin_intelephense_resources = gnome.compile_resources(
+  'intelephense-resources',
+  'intelephense.gresource.xml',
+  c_name: 'gbp_intelephense',
 )
 
+plugins_sources += plugin_intelephense_resources
+
 endif


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