@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 <geanyplugin.h>
+
+static gboolean autocomplete_provided(GeanyDocument *doc, gpointer data)
+{
+    return doc->file_type->id == GEANY_FILETYPES_PYTHON;
+}
+
+
+static void autocomplete_perform(GeanyDocument *doc, gboolean force, gpointer 
data)
+{
+    const gchar *kwd_str = "False None True and as assert async await break 
case class continue def del elif else except finally for from global if import 
in is lambda match nonlocal not or pass raise return try while with yield";

It was easier for me to copy/paste the keyword list from Geany and then convert 
it to the array in the code ;-). Also, in "production code" the conversion 
could happen once and not every time autocompletion is performed.

In any case, I think it's fine as an example as this is a bit artificial anyway.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#discussion_r1659829706
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3849/review/[email protected]>

Reply via email to