Re: Develop Kate plugin (for Ollama integration)

"Daniele \"Mte90\" Scasciafratte" <[email protected]> Mon, 24 Mar 2025 10:49:30 +0100
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------60NMMJyFQUHP30JOynIC8YZ7
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

Yeah I saw the issue with qt5/6 but in the meantime I want to do that plugin...

I am trying KAppTemplate with KTextEditor plugin :-)


Daniele Scasciafratte - OpenSource MultiVersal Guy
daniele.tech <https://daniele.tech> - @Mte90Net <https://twitter.com/Mte90net> - GitHub <https://github.com/Mte90> - Italian Linux Society council member <http://www.ils.org/> - Mozillian <https://people.mozilla.org/p/Mte90>
Ex Mozilla Reps/TechSpeakers, (Ex) WordPress Core Contributor <https://profiles.wordpress.org/mte90>,
LibreItalia member <http://www.libreitalia.it/>, Wikimedia Italia member <https://www.wikimedia.it/> and ILS Rieti founder <https://rieti.ils.org/>.
Il 23/03/25 10:09, Kåre Särs ha scritto:
> Hi,
>
> Nice that you are interested in working on stuff with Kate :)
>
> Unfortunately for you on Debian Sid, all Kate development has moved to Qt6 and
> KF6 over a year ago. Any changes you would need to upstream would have to go
> to the Qt6 version...
>
> That said you could test to get a plugin working by using KAppTemplate to
> create a Kate plugin. With that template it should be possible to install the
> plugin to the right system location with CMake
>
> mkdir build
> cd build
> cmake -DCMAKE_INSTALL_PREFIX=/usr ../
> cmake --build .
> sudo cmake --build . --target install
>
> Hope that helps,
>
> Br,
>    Kåre
>   
> On Tuesday, 18 March 2025 16.55.34 Eastern European Standard Time Daniele
> "Mte90" Scasciafratte wrote:
>> Hi Everyone,
>>
>> I am on Debian Sid, and I am not very skilled with C++ but I am trying to do
>> a plugin to integrate Ollama inside Kate.
>>
>> There ishttps://github.com/arturbac/kdevcxx_with_ai but is only for OpenAI
>> and I have issues on compiling (already reported) and the dev are not very
>> responsive.
>>
>> Followinghttps://develop.kde.org/docs/apps/kate/plugin/ I was able to do
>> https://github.com/Mte90/kate-ollama
>>
>> The problem is that on installing the plugin path is "-- Installing:
>> /usr/lib/x86_64-linux-gnu/qt5/plugins/ktexteditor/kate-ollama.so" but Kate
>> doesn't load it.
>>
>> The plugin of course is not complete as I want to do some testing and
>> probably improve the UX but if I am not able to try it...
>>
>> What I am missing?
>
>
>
--------------60NMMJyFQUHP30JOynIC8YZ7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p>Hi,</p>
    <p>Yeah I saw the issue with qt5/6 but in the meantime I want to do
      that plugin...</p>
    <pre wrap="" class="moz-quote-pre">I am trying KAppTemplate with KTextEditor plugin :-)</pre>
    <div class="moz-signature"><br>
      <small>Daniele Scasciafratte - OpenSource MultiVersal Guy<br>
        <a href="https://daniele.tech">daniele.tech</a> - <a
          href="https://twitter.com/Mte90net">@Mte90Net</a> - <a
          href="https://github.com/Mte90">GitHub</a> - <a
          href="http://www.ils.org/">Italian Linux Society council
          member</a> - <a href="https://people.mozilla.org/p/Mte90">Mozillian</a><br>
        Ex Mozilla Reps/TechSpeakers, <a
          href="https://profiles.wordpress.org/mte90">(Ex) WordPress
          Core Contributor</a>, <br>
        <a href="http://www.libreitalia.it/">LibreItalia member</a>, <a
          href="https://www.wikimedia.it/">Wikimedia Italia member</a>
        and <a href="https://rieti.ils.org/">ILS Rieti founder</a>.</small><br>
    </div>
    <div class="moz-cite-prefix">Il 23/03/25 10:09, Kåre Särs ha
      scritto:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2233127.irdbgypaU6@sars-xps-13-9370">
      <pre wrap="" class="moz-quote-pre">Hi,

Nice that you are interested in working on stuff with Kate :)

Unfortunately for you on Debian Sid, all Kate development has moved to Qt6 and 
KF6 over a year ago. Any changes you would need to upstream would have to go 
to the Qt6 version...

That said you could test to get a plugin working by using KAppTemplate to 
create a Kate plugin. With that template it should be possible to install the 
plugin to the right system location with CMake

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ../
cmake --build .
sudo cmake --build . --target install

Hope that helps,

Br,
  Kåre
 
On Tuesday, 18 March 2025 16.55.34 Eastern European Standard Time Daniele 
"Mte90" Scasciafratte wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Hi Everyone,

I am on Debian Sid, and I am not very skilled with C++ but I am trying to do
a plugin to integrate Ollama inside Kate.

There is <a class="moz-txt-link-freetext" href="https://github.com/arturbac/kdevcxx_with_ai">https://github.com/arturbac/kdevcxx_with_ai</a> but is only for OpenAI
and I have issues on compiling (already reported) and the dev are not very
responsive.

Following <a class="moz-txt-link-freetext" href="https://develop.kde.org/docs/apps/kate/plugin/">https://develop.kde.org/docs/apps/kate/plugin/</a> I was able to do
<a class="moz-txt-link-freetext" href="https://github.com/Mte90/kate-ollama">https://github.com/Mte90/kate-ollama</a>

The problem is that on installing the plugin path is "-- Installing:
/usr/lib/x86_64-linux-gnu/qt5/plugins/ktexteditor/kate-ollama.so" but Kate
doesn't load it.

The plugin of course is not complete as I want to do some testing and
probably improve the UX but if I am not able to try it...

What I am missing?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">



</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>

--------------60NMMJyFQUHP30JOynIC8YZ7--