how to get the list of keywords in KSyntaxHighlighting
Dominik Haumann
dhaumann at kde.org
Sun Jul 29 20:33:50 BST 2018
On Sun, Jul 29, 2018 at 6:16 PM, Alexander Semke <alexander.semke at web.de> wrote:
> Hi Dominik,
>
>> sorry for the delay, I only now saw your mail.
>> Jonathan meanwhile posted a patch that adds this:
>> https://phabricator.kde.org/D14434
> Yes, I saw it already. Will this make into the 5.49 release of the frameworks?
>
>
>> However, pushing this further, what Kate also needs is a way go get
>> all keyword lists that are matched in the current context. This allows
>> for instance for context based auto completion that Kate also supports.
>>
>> Would that be of interest for you as well
> I think this makes sense. At the moment there is some custom logic for
> completion in Cantor's code. To refactor all this logic will take more time.
>
> Now I'd simply remove the manual maintanence of keywords in Cantor like it is
> done for Maxima at the moment (keywords orginally copied from Kate's code).
> For some other "backend systems" like Octave and R the keywords are obtained
> dynamically during the runtime from the backend which makes the presence of
> the actual backend system required, even if the user simply wants to _read_ a
> saved project. This is what I want to re-factor now to make https://
> phabricator.kde.org/T4760 possible - the user should be able to read Cantor's
> worksheets without the backend system being present on the target system.
> Moving to KSyntaxHighlighing with the new functions added by Jonathan will
> make this possible.
>
> So, if it's not a big problem to extend the APIs as done by Jonathan now,
> let's go for it even though Cantor is maybe the only consumer of this APIs
> now.
Thanks for this explanation. If you have a use case then I agree with
this change. Also getting the keyword lists of a Definition allows for
better unit testing, so I think this is also a minor reason for
approving this patch.
Thanks,
Dominik
More information about the Kde-frameworks-devel
mailing list