Re: Asking for recommendations on how to add a feature to KTextEditor
On Monday, 9 April 2018 13:13:46 CEST Aleix Pol wrote: > On Mon, Apr 9, 2018 at 12:49 PM, Michal Srbwrote: > > Hi, > > > > I would like to ask for hints/recommendations on how to implement a > > feature for KTextEditor. > > > > My ultimate goal is to make a plugin for KDevelop that will show some > > additional information in the code itself. For example names of > > function arguments at call site. Something like this in intellij: > > https://d3nmt5vlzunoa1.cloudfront.net/idea/files/2016/09/Screen-Shot-2016-> > > > 09-27-at-10.29.15.png Heya Michal, That indeed would be super helpful to have, for a variety of use-cases. +1 on the idea for the feature! Can't help a lot with implementing this correctly in KTextEditor, though. The Kate people should chime in there :) Cheers, Kevin > > For this I would need a way to render something in the text, affecting > > the layout of the line. It would be nice to be able to place any > > general widget or image into the line, but even plain text would be > > sufficient. It must behave differently than the "real" text around it, > > such that it can not be edited, cursor skips it, copying does not copy > > it, etc. > > > > So far I thought of adding something like `AnnotationViewInterface`, > > which would allow to add this kind of immutable text on line+column > > position. Then in `KateRenderer` it could take these into > > consideration when layouting the line and render it in. It would be > > visible in the text, but never become a real part of the text. > > > > Would you recommend some other approach, or is there perhaps a way to > > do it without modifying KTextEditor? > > Including kwrite-devel where many kate developers live. :) > Looking forward to seeing your feature implemented in KDevelop! :D > > Aleix -- Kevin Funk | kf...@kde.org | http://kfunk.org signature.asc Description: This is a digitally signed message part.
Re: Asking for recommendations on how to add a feature to KTextEditor
On Mon, Apr 9, 2018 at 12:49 PM, Michal Srbwrote: > Hi, > > I would like to ask for hints/recommendations on how to implement a > feature for KTextEditor. > > My ultimate goal is to make a plugin for KDevelop that will show some > additional information in the code itself. For example names of > function arguments at call site. Something like this in intellij: > https://d3nmt5vlzunoa1.cloudfront.net/idea/files/2016/09/Screen-Shot-2016-09-27-at-10.29.15.png > > For this I would need a way to render something in the text, affecting > the layout of the line. It would be nice to be able to place any > general widget or image into the line, but even plain text would be > sufficient. It must behave differently than the "real" text around it, > such that it can not be edited, cursor skips it, copying does not copy > it, etc. > > So far I thought of adding something like `AnnotationViewInterface`, > which would allow to add this kind of immutable text on line+column > position. Then in `KateRenderer` it could take these into > consideration when layouting the line and render it in. It would be > visible in the text, but never become a real part of the text. > > Would you recommend some other approach, or is there perhaps a way to > do it without modifying KTextEditor? Including kwrite-devel where many kate developers live. :) Looking forward to seeing your feature implemented in KDevelop! :D Aleix
Asking for recommendations on how to add a feature to KTextEditor
Hi, I would like to ask for hints/recommendations on how to implement a feature for KTextEditor. My ultimate goal is to make a plugin for KDevelop that will show some additional information in the code itself. For example names of function arguments at call site. Something like this in intellij: https://d3nmt5vlzunoa1.cloudfront.net/idea/files/2016/09/Screen-Shot-2016-09-27-at-10.29.15.png For this I would need a way to render something in the text, affecting the layout of the line. It would be nice to be able to place any general widget or image into the line, but even plain text would be sufficient. It must behave differently than the "real" text around it, such that it can not be edited, cursor skips it, copying does not copy it, etc. So far I thought of adding something like `AnnotationViewInterface`, which would allow to add this kind of immutable text on line+column position. Then in `KateRenderer` it could take these into consideration when layouting the line and render it in. It would be visible in the text, but never become a real part of the text. Would you recommend some other approach, or is there perhaps a way to do it without modifying KTextEditor? Thank you, Michal Srb