Merged #3849 into master.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#event-13750265059
You are receiving this because you are subscribed to this thread.
Message ID:
The day has come, merging. 🎉
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#issuecomment-2266740331
You are receiving this because you are subscribed to this thread.
Message ID:
> IIUC there was no code changes since my review, so looks good. And history
> looks OK as well 👍
OK, if there are no objections, I'll merge this PR during the weekend and will
start working on the final version of the plugin for geany-plugins so it can
get merged too.
I'll then announce the n
> @b4n How does the PR look to you? OK to merge?
IIUC there was no code changes since my review, so looks good. And history
looks OK as well :+1:
> @b4n, IIRC you were the last one to touch it, so how hard is it to extend the
> API/ABI versioning system to version the extension interface sepa
> But speaking of releases, wasn't there the plan make one in the near future?
Yes, which was why I asked the question.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#issuecomment-762522
You are receiving this because you are subscribed to this
As long as we don't put out a release I wouldn't worry much with API changes.
Whoever uses the development head gets the development head.
But speaking of releases, wasn't there the plan make one in the near future?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany
@b4n, IIRC you were the last one to touch it, so how hard is it to extend the
API/ABI versioning system to version the extension interface separate from the
overall plugin interface, then most plugins can still work if the extension
interface is changed in incompatible ways, only extensions need
> Then, I would probably try to implement a python-lsp plugin in python, or do
> you have a better idea?
I'd suggest having a look at `plugins/demopluginext.c` that this PR adds and
reimplementing it in Python. Then you can add the additional functions from
this interface (for @elextr - pointer
I have made some progress, in that peasy currently cannot generate GI stuff
against Geany's master. Need to repair that first.
Then, I would probably try to implement a python-lsp plugin in python, or do
you have a better idea?
I don' think this needs to block this PR, if you're OK that the AP
@elextr commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
> FWIW, I would like to ensure peasy plugins can use this APIs. I'm going to try
@kugel- Any progress here? I think this is the only thing that prevents this PR
from being merged, right? There's still quite a lot things to do when this gets
merged like finalizing the geany-plugins PR, updating d
@techee commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
@elextr commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
@kugel- commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
@techee commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
@kugel- commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
@techee commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
@b4n commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlighting i
@elextr commented on this pull request.
> + * to the members ending with @c _perform are called by Geany at appropriate
+ * moments to inform the plugin when to perform the given feature.
+ *
+ * The extension is defined by the pointers in the PluginExtension structure
and
+ * is registered in
@kugel- commented on this pull request.
> + * to the members ending with @c _perform are called by Geany at appropriate
+ * moments to inform the plugin when to perform the given feature.
+ *
+ * The extension is defined by the pointers in the PluginExtension structure
and
+ * is registered in
@elextr commented on this pull request.
> + * to the members ending with @c _perform are called by Geany at appropriate
+ * moments to inform the plugin when to perform the given feature.
+ *
+ * The extension is defined by the pointers in the PluginExtension structure
and
+ * is registered in
@kugel- commented on this pull request.
> + * to the members ending with @c _perform are called by Geany at appropriate
+ * moments to inform the plugin when to perform the given feature.
+ *
+ * The extension is defined by the pointers in the PluginExtension structure
and
+ * is registered in
@kugel- commented on this pull request.
> + gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean
> definition, gpointer data);
+
+ /**
+* Pointer to function called by Geany to check whether the plugin
implements
+* additional symbol (e.g. type) highlightin
FWIW, I would like to ensure peasy plugins can use this APIs. I'm going to try
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#issuecomment-2198541335
You are receiving this because you are subscribed to this thread.
Message ID:
> I'd like
> https://github.com/geany/geany/commit/d34a0a36e761cb2844ae50ffaceaee18fee0d348
> (and its fix(es?)) be separate; for the rest it's your call. I'd keep the
> same separation as you initially did and squash the changes, but if it
> becomes too complicated you can also just squash the
@techee pushed 9 commits.
52295a212df524b89808222d60478577940ccc1b Add interface used by plugins to
replace some Geany functionality with their own implementation
f115ec2ac883f4ef5a658372e70a289a215d8dff Add Geany code delegating
autocompletion to plugins
9dda177389b276f6846394af9f82c4b3f09f13
@elextr commented on this pull request.
> + *
+ * Then copy or symlink the plugins/demopluginext.so file to
~/.config/geany/plugins
+ * - it will be loaded at next startup.
+ */
+
+#include
+
+static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+return doc->file_typ
> @b4n If it's kind of alright, what should I do now - squash into a single
> commit or try to preserve the history and squash just the various fixes?
I'd like
https://github.com/geany/geany/pull/3849/commits/d34a0a36e761cb2844ae50ffaceaee18fee0d348
(and its fix(es?)) be separate; for the rest
@b4n approved this pull request.
LGTM. I didn't re-test it extensively, but not much has changed in the code
anyway. A little squashing after @elextr's last proofread if he wants, and we
should be golden
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/p
@b4n commented on this pull request.
> + * cd plugins
+ * make demopluginext.so
Ah OK, fair enough then. Doesn't matter much indeed anyway.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#discussion_r1659970274
You are receiving this because you
@techee commented on this pull request.
> + *
+ * Then copy or symlink the plugins/demopluginext.so file to
~/.config/geany/plugins
+ * - it will be loaded at next startup.
+ */
+
+#include
+
+static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+return doc->file_typ
> Minor nitpicks, but looks pretty good now I'd say 👍
@b4n If it's kind of alright, what should I do now - squash into a single
commit or try to preserve the history and squash just the various fixes?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849
@techee commented on this pull request.
> + Geany built-in functionality.
+
+When the plugin returns @c TRUE from the function assigned to the @c _provided
+member of @c PluginExtension, it indicates
+it wants to take control of the particular feature and disable Geany's
+implementation. Howev
@techee pushed 1 commit.
53a16a2ce0d8d58107c8dd8d3d4ad27013421f9e Add clarification to plugins.dox
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/036ef8e8ead976f52b842c760fb81bbcdb8c51b9..53a16a2ce0d8d58107c8dd8d3d4ad27013421f9e
You are receiving this because you are subsc
@b4n commented on this pull request.
> + *
+ * Then copy or symlink the plugins/demopluginext.so file to
~/.config/geany/plugins
+ * - it will be loaded at next startup.
+ */
+
+#include
+
+static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+return doc->file_type->
@techee commented on this pull request.
> + * cd plugins
+ * make demopluginext.so
I basically just copied this from `demoplugin.c`. So we should either modify
both or leave them as they are - IMO it doesn't matter much, I imagine someone
would just copy/paste the code from here to their own
@techee pushed 1 commit.
036ef8e8ead976f52b842c760fb81bbcdb8c51b9 Update src/pluginextension.c
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/c72f22bd6cf3563f72f9f088fbd538dcfd0381a7..036ef8e8ead976f52b842c760fb81bbcdb8c51b9
You are receiving this because you are subscribe
@techee pushed 1 commit.
c72f22bd6cf3563f72f9f088fbd538dcfd0381a7 Update src/pluginextension.c
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/ec9365127e980d81656f1c5184388ae80ddd7945..c72f22bd6cf3563f72f9f088fbd538dcfd0381a7
You are receiving this because you are subscribe
@techee pushed 1 commit.
ec9365127e980d81656f1c5184388ae80ddd7945 Update src/pluginextension.c
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/f5da5508c2c4fe5cf6557f4769e93e590b9397b5..ec9365127e980d81656f1c5184388ae80ddd7945
You are receiving this because you are subscribe
@techee commented on this pull request.
> + *
+ * Then copy or symlink the plugins/demopluginext.so file to
~/.config/geany/plugins
+ * - it will be loaded at next startup.
+ */
+
+#include
+
+static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+return doc->file_typ
@b4n commented on this pull request.
Minor nitpicks, but looks pretty good now I'd say :+1:
> + Geany built-in functionality.
+
+When the plugin returns @c TRUE from the function assigned to the @c _provided
+member of @c PluginExtension, it indicates
+it wants to take control of the particula
@techee pushed 1 commit.
f5da5508c2c4fe5cf6557f4769e93e590b9397b5 Update the priority of the example
extension based on the guidelines
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/935a24f93aa3c053b24c2b53cdb4a2173fc330d7..f5da5508c2c4fe5cf6557f4769e93e590b9397b5
You are
Alright, I hope I addressed all the review comments and didn't forget about
anything. I tried to replace most of the `_provided()` functions and friends by
something like "functions assigned to the PluginExtension members ending with
_provided". I think there were a few exceptions where I referr
@techee commented on this pull request.
> @@ -258,6 +259,23 @@ const gchar *symbols_get_context_separator(gint ft_id)
}
+/** Gets the icon data corresponding to the provided TMIcon.
+ * @param icon TMIcon.
+ *
+ * Returns the GdkPixbuf corresponding to the provided TMIcon.
+ *
+ * @since 2.
@techee commented on this pull request.
> + * functions can be left to contain the NULL pointer.
+ *
+ * Typically, functions from this interface come in pairs. Functins ending with
+ * @c _provided() inform Geany whether the plugin implements the given feature
+ * for the passed document. Func
@techee commented on this pull request.
> +
+#ifndef GEANY_PLUGIN_EXTENSION_H
+#define GEANY_PLUGIN_EXTENSION_H 1
+
+#include "document.h"
+
+
+G_BEGIN_DECLS
+
+/**
+ * Structure serving as an interface between plugins and Geany allowing
+ * plugins inform Geany about what features they provide
@techee pushed 1 commit.
935a24f93aa3c053b24c2b53cdb4a2173fc330d7 Update documentation based on review
comments
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/4e1adce4ef6ee7cacd4d069fe824246b59a71cd2..935a24f93aa3c053b24c2b53cdb4a2173fc330d7
You are receiving this because
@techee pushed 1 commit.
4e1adce4ef6ee7cacd4d069fe824246b59a71cd2 Revert "Export some types/functions
so plugins have access to Geany symbol icons"
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/f99af6648bbfd4b2b16b20e6bcfca5e1b6486e00..4e1adce4ef6ee7cacd4d069fe824246b59a
@cwendling commented on this pull request.
> + */
+#define CALL_PROVIDED(f, doc, ext)
\
+ G_STMT_START {
> But you already do understand it, so you are a bad judge of that, there is a
> name for this [curse of
> knowledge](https://en.wikipedia.org/wiki/Curse_of_knowledge). Better that you
> believe the advice from someone who was initially confused (me) that it is
> not as obvious as you think it
> I think everyone wanting to implement this interface will understand it
But you already do understand it, so you are a bad judge of that, there is a
name for this [curse of
knowledge](https://en.wikipedia.org/wiki/Curse_of_knowledge). Better that you
believe the advice from someone who was
@techee commented on this pull request.
> +
+Since Geany 2.1 the PluginExtension API allows plugins to take over some of
+the core Geany functionality, such as autocopletion, calltip display, symbol
goto,
+typename highlighting inside document, etc.
+
+@section plugin_extension_init Initializat
> It is confusing the way function pointers that are members of struct
> PluginExtension are referred to as eg "_perform() function". They are not
> functions, they are function pointers with specific member names that end in
> _perform and _provided, the functions they point to are in the plugi
@elextr commented on this pull request.
> + * or dynamically. When allocated dynamically, plugins should always
+ * zero-fill the structure before use.
+ *
+ * Depending on the functionality they provide, plugins should assign the
+ * pointers from the structure to the functions implementing th
@elextr commented on this pull request.
> +#include "document.h"
+
+
+G_BEGIN_DECLS
+
+/**
+ * Structure serving as an interface between plugins and Geany allowing
+ * plugins inform Geany about what features they provide and allowing
+ * Geany to delegate its functionality to the plugins.
+ *
@techee commented on this pull request.
> + * or dynamically. When allocated dynamically, plugins should always
+ * zero-fill the structure before use.
+ *
+ * Depending on the functionality they provide, plugins should assign the
+ * pointers from the structure to the functions implementing th
@elextr commented on this pull request.
> @@ -258,6 +259,23 @@ const gchar *symbols_get_context_separator(gint ft_id)
}
+/** Gets the icon data corresponding to the provided TMIcon.
+ * @param icon TMIcon.
+ *
+ * Returns the GdkPixbuf corresponding to the provided TMIcon.
+ *
+ * @since 2.
@techee commented on this pull request.
> +#include "document.h"
+
+
+G_BEGIN_DECLS
+
+/**
+ * Structure serving as an interface between plugins and Geany allowing
+ * plugins inform Geany about what features they provide and allowing
+ * Geany to delegate its functionality to the plugins.
+ *
@elextr commented on this pull request.
> + */
+#define CALL_PROVIDED(f, doc, ext)
\
+ G_STMT_START {
@elextr commented on this pull request.
> +
+Since Geany 2.1 the PluginExtension API allows plugins to take over some of
+the core Geany functionality, such as autocopletion, calltip display, symbol
goto,
+typename highlighting inside document, etc.
+
+@section plugin_extension_init Initializat
@elextr commented on this pull request.
> @@ -1116,4 +1118,130 @@ static void proxy_cleanup(GeanyPlugin *plugin,
> gpointer pdata)
@endcode
+@page plugin_extension Plugin Extension HowTo
+
+@section plugin_extension_intro Introduction
+
+Since Geany 2.1 the PluginExtension API allows plugi
@techee commented on this pull request.
> @@ -258,6 +259,23 @@ const gchar *symbols_get_context_separator(gint ft_id)
}
+/** Gets the icon data corresponding to the provided TMIcon.
+ * @param icon TMIcon.
+ *
+ * Returns the GdkPixbuf corresponding to the provided TMIcon.
+ *
+ * @since 2.
@techee commented on this pull request.
> + */
+#define CALL_PROVIDED(f, doc, ext)
\
+ G_STMT_START {
@techee commented on this pull request.
> +
+Since Geany 2.1 the PluginExtension API allows plugins to take over some of
+the core Geany functionality, such as autocopletion, calltip display, symbol
goto,
+typename highlighting inside document, etc.
+
+@section plugin_extension_init Initializat
@techee commented on this pull request.
> @@ -1116,4 +1118,130 @@ static void proxy_cleanup(GeanyPlugin *plugin,
> gpointer pdata)
@endcode
+@page plugin_extension Plugin Extension HowTo
+
+@section plugin_extension_intro Introduction
+
+Since Geany 2.1 the PluginExtension API allows plugi
@elextr commented on this pull request.
> +
+/**
+ * Registers the provided extension in Geany. There can be multiple extensions
+ * registered in Geany - these are stored in a list sorted by the priporty
+ * parameter. When executing @c _perform() functions, Geany goes through
+ * the list and
@b4n commented on this pull request.
> +
+/**
+ * Registers the provided extension in Geany. There can be multiple extensions
+ * registered in Geany - these are stored in a list sorted by the priporty
+ * parameter. When executing @c _perform() functions, Geany goes through
+ * the list and exe
@elextr commented on this pull request.
> +static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+/* Check whether the plugin provides the feature for the passed document */
+return doc->file_type->id == GEANY_FILETYPES_PYTHON;
+}
+
+
+static void autocomplete_perfo
@b4n commented on this pull request.
> +static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+/* Check whether the plugin provides the feature for the passed document */
+return doc->file_type->id == GEANY_FILETYPES_PYTHON;
+}
+
+
+static void autocomplete_perform(
@elextr commented on this pull request.
> + * the list and executes the @c _perform() function of the first extension in
+ * the list whose @c _provided() function returns @c TRUE.
+ *
+ * This function is typically called in the plugin @c init() function.
+ *
+ * Plugins wishing to re-registe
@b4n commented on this pull request.
> + * Plugins wishing to re-register themselves, e.g. with a different priority,
+ * should first unregister themselves using @c plugin_extension_unregister()
+ * and call @c plugin_extension_register() afterwards.
+ *
+ * @param extension The @c PluginExten
@b4n commented on this pull request.
> + * the list and executes the @c _perform() function of the first extension in
+ * the list whose @c _provided() function returns @c TRUE.
+ *
+ * This function is typically called in the plugin @c init() function.
+ *
+ * Plugins wishing to re-register t
@elextr commented on this pull request.
> + g_return_if_fail(ext_name != NULL);
+
+ entry = g_malloc(sizeof *entry);
+ entry->extension = extension;
+ entry->data = data;
+ entry->priority = priority;
+
+ all_extensions = g_list_insert_sorted(all_extensions, ent
@b4n commented on this pull request.
> + g_return_if_fail(ext_name != NULL);
+
+ entry = g_malloc(sizeof *entry);
+ entry->extension = extension;
+ entry->data = data;
+ entry->priority = priority;
+
+ all_extensions = g_list_insert_sorted(all_extensions, entry,
@elextr requested changes on this pull request.
@techee a (mostly) documentation review, lots of minor tweaks, but a
significant point that I have commented on several times and might be best if I
summarise here:
It is confusing the way function pointers that are members of struct
PluginExtens
I've added the howto and a simple example under `plugins/demopluginext.c`.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#issuecomment-2183290111
You are receiving this because you are subscribed to this thread.
Message ID:
@techee pushed 1 commit.
f99af6648bbfd4b2b16b20e6bcfca5e1b6486e00 Add PluginExtension HowTo to API
documentation
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/b111bc160a2176e158fe83c4d476b8a018d65b59..f99af6648bbfd4b2b16b20e6bcfca5e1b6486e00
You are receiving this becaus
@techee pushed 2 commits.
64a2f5a6b5a72f238cfc303c6a2395ee25c0047b Improve demopluginext.c a little
b111bc160a2176e158fe83c4d476b8a018d65b59 Use "modern" Geany API when talking
about init() and cleanup() functions
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/2b0b55df39
@techee pushed 2 commits.
e5287871054759c45d3f19871daa5d4db2bec769 Fix parameter name
2b0b55df399eb3685c88e254a290f89fb0fb3efd Add simple PluginExtension demo
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/3785bc92bf24e2898ffc2b40abbc516e3a9ba04d..2b0b55df399eb3685c88e254
@elextr Agree, I was thinking about it myself too - the documentation looks the
whole thing is much more complicated than it really is. I think I'll create
some `PluginExtension` howto similarly to e.g. `Proxy Plugin HowTo`
https://www.geany.org/manual/reference/proxy.html
with some minimal plu
Had a first look at the documentation, will comment in detail soon where
needed, but one point that has become apparent is that it would be nice to have
some overview to introduce the concept of extensions, what they are (plugins)
what is special that makes them "extensions" (replace Geany funct
@techee pushed 1 commit.
3785bc92bf24e2898ffc2b40abbc516e3a9ba04d Rename plugin_name parameter of
plugin_extension_register() to ext_name
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/4a40ff0e3a0bb90818c7a31fbe778bf4efcb2039..3785bc92bf24e2898ffc2b40abbc516e3a9ba04d
You
@b4n @elextr Alright, documentation pushed, please let me know if I missed
something, something should be reworded or fixed.
I didn't write much about the "priority" parameter of `_register()` because I
don't know yet if Geany itself will use this interface too or not or what
priority it will h
@techee pushed 2 commits.
37194e920cd671d660a483d6b813e5ab88dd7e00 Add PluginExtension documentation
4a40ff0e3a0bb90818c7a31fbe778bf4efcb2039 Remove currently unused plugin_name
from PluginExtensionEntry
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/052eb37425a3ec32535d
@techee commented on this pull request.
> + const PluginExtensionEntry *entry_b = b;
+
+ return entry_b->priority - entry_a->priority;
+}
+
+
+GEANY_API_SYMBOL
+void plugin_extension_register(PluginExtension *extension, const gchar
*plugin_name,
+ gint priority, gpointer data)
+
@techee commented on this pull request.
> + plugin_extension_calltips_show(editor->document, FALSE);
+ plugin_extension_autocomplete_perform(editor->document, FALSE);
Well, I have just 2 real-world examples to base this on - the LSP plugin and
Geany itself. For Geany, both calltips a
@b4n commented on this pull request.
> + const PluginExtensionEntry *entry_b = b;
+
+ return entry_b->priority - entry_a->priority;
+}
+
+
+GEANY_API_SYMBOL
+void plugin_extension_register(PluginExtension *extension, const gchar
*plugin_name,
+ gint priority, gpointer data)
+{
+
@b4n commented on this pull request.
> + plugin_extension_calltips_show(editor->document, FALSE);
+ plugin_extension_autocomplete_perform(editor->document, FALSE);
OK, if you think extensions implementing those will basically never have to re
do this separately because they have some
> Anyway, apart from those two fairly little things, I think I'm happy with how
> this looks 🙂
I'm mostly done with the documentation, I just need to read the garbage I have
written after myself with a fresh head tomorrow :-)
--
Reply to this email directly or view it on GitHub:
https://github
@techee commented on this pull request.
> + plugin_extension_calltips_show(editor->document, FALSE);
+ plugin_extension_autocomplete_perform(editor->document, FALSE);
Technically they could be obtained from `editor-notify` and plugins could call
`plugin_extension_autocomplete_provide
@techee commented on this pull request.
> + const PluginExtensionEntry *entry_b = b;
+
+ return entry_b->priority - entry_a->priority;
+}
+
+
+GEANY_API_SYMBOL
+void plugin_extension_register(PluginExtension *extension, const gchar
*plugin_name,
+ gint priority, gpointer data)
+
Anyway, apart from those two fairly little things, I think I'm happy with how
this looks :slightly_smiling_face:
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#issuecomment-2163848773
You are receiving this because you are subscribed to this threa
@b4n pushed 1 commit.
052eb37425a3ec32535de35b0712f01bf9488317 fixup! Move
plugin_extension_calltips_provided() check inside on_editor_notify()
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/09295cea1d13e849f8269da666a96db519e08d6c..052eb37425a3ec32535de35b0712f01bf948831
@b4n commented on this pull request.
> + const PluginExtensionEntry *entry_b = b;
+
+ return entry_b->priority - entry_a->priority;
+}
+
+
+GEANY_API_SYMBOL
+void plugin_extension_register(PluginExtension *extension, const gchar
*plugin_name,
+ gint priority, gpointer data)
+{
+
@b4n commented on this pull request.
> + plugin_extension_calltips_show(editor->document, FALSE);
+ plugin_extension_autocomplete_perform(editor->document, FALSE);
Hum… do we actually want the calls here? I'm fine with them, don't get me
wrong, but does this actually help the extens
> I wouldn't do that, extensions should just behave correctly.
OK. Indeed I don't want this to be *necessary*, but if it's there for safety
people will start relying on it (and rightfully so, otherwise it's just dead
code, right?)
> And if the plugin is unloaded and the extension is still regi
@b4n commented on this pull request.
> {
+ GeanyDocument *doc = document_get_current();
+
+ if (plugin_extension_goto_provided(doc, NULL))
+ return plugin_extension_goto_perform(doc, pos, definition);
I'd say 2 or 3 (definitely not 1). I just pushed a version of 3, g
@b4n pushed 1 commit.
09295cea1d13e849f8269da666a96db519e08d6c Honor selection again in
symbols_goto_tag()
--
View it on GitHub:
https://github.com/geany/geany/pull/3849/files/b7c6b84ee0d77af826994bce8c59073d1f363dd8..09295cea1d13e849f8269da666a96db519e08d6c
You are receiving this because you
@techee commented on this pull request.
> {
+ GeanyDocument *doc = document_get_current();
+
+ if (plugin_extension_goto_provided(doc, NULL))
+ return plugin_extension_goto_perform(doc, pos, definition);
So what should I do here? The options I see are:
1. Make the fun
> the idea to e.g. be able to cleanup extensions on plugin unload is starting
> to grow on me
I wouldn't do that, extensions should just behave correctly. And if the plugin
is unloaded and the extension is still registered, there will probably be a
huge crash that the extension developer notice
1 - 100 of 181 matches
Mail list logo