feat: Merge suggestion with existing code if it looks similar
Hi!
This is something like what I meant in #152 .
It doesn't affect representation. During full suggestion apply, it searches for the next rows that look similar to the applied text. If they are similar enough (this should be configurable, perhaps) it replaces the found rows with suggested.
No real use in this example though :)
Thank you, I will check how it works on my side
Looks very nice and works great for apply() all rows. Thank you! Can we adapt this to visualize completions before inserting? Now it shows old changes. PS I definitely want to merge this, so don't forget to add your copyrights and remove the qDebug()
Ok, I'll experiment with visualization
Looks like QTC supports suggestions only for a single QTextBlock and doesn't allow to set multiple suggestions or even change suggestion visualization format. So I just add a comment about replacing lines count =\
yes, I also found the capabilities of QtC in the code editor are very limited. But I thought maybe via LSP we can do it more or creating several suggestion. I will review your code and maybe suppose smth else or merge that with specific settings. Thank you!
Sorry for delay, I checked your code and Idea, and I think it looks great and I will be back soon to add this to plugin. I need to finish something bigger, that allow us to use differents types of code suggestion and easy to setup