I tried to code a plugin for copilot but soon realized that your api doesn't allow low level control of scintilla or I'm too noob to realize how. Copilot only needs to grab context from current cursor position (say 200 chars before and after), then it will suggest autocompletion options. Btw, Copilot is not the only tool for the task, I plan to add and OpenAI backend that can be gracefully replaced by LocalAI for 100% private and off-line coding (so no IP issues). Devs can choose to train/finetune their own LLM if they wish, plug it into LocalAI and let the geany plugin take care of the rest.
Whats wrong with [this](https://www.geany.org/manual/reference/sciwrappers_8h.html#aa24517d0c81f780d...) to get text?
Note that its probably UB if `start` and `end` are not UTF-8 code point boundaries.
Closed #3543 as completed.
Hi @develCuy !
Have you made the plugin yet? Is this plugin public?
Thank you so much!
Managed to code an script for geanylua plugin. It integrates with any OpenAI API (i.e: api.openai.com, llama-server, ollama, etc.)
Should I PR geany/plugins or push to my own separate repo?
@develCuy probably best to make your own repo for now so people can test it, in particular as it is dependent on the (ATM) unsupported Geanylua plugin. So far there are no Lua plugins added to Geany-plugins collection so it would be a new concept. You can of course add an entry in the wiki for Geany.
If lots of people find it useful and heap praise on it perhaps the issue of Geanylua being unsupported and how Lua sub-plugins would be included might be able to be addressed.
Thank you @elextr!
Code pushed into its own repo: https://github.com/develCuy/geany-copilot
github-comments@lists.geany.org