Open ouuan opened 4 years ago
Hi ouuan Thanks for Opening a new Issue here. I will also thank you for strictly following the Issue Templates. I will add an appropriate tag to your Issue.
Have Patience, One of our Cool Contributors will help you soon.
In fact, I'd like to write a Chinese blog to introduce CP Editor to others as soon as the new editor is done. I think QCodeEditor has too many problems that I can't persuade people to use CP Editor.
Yeah sure. I will surely work on implementing this ASAP.
Work in Progress : On branch scintilla.
There are some features that may not work with scintilla like themes, so for now scintilla will only have Default white theme
We can add themes manually, though that's a big work. I think it's necessary to support at least one dark theme first.
Yeah, first let me make it fully functional then we will work on UI aspect of it
QScintilla will be an addition and QCodeEditor will not go anywhere. User will have choice to use one of the two editors, however change of editor will require the restart to take effect.
(from Telegram private messages)
This needs to become optional, I will still work on this and add as optional feature.
We are continuing to use this editor but since language server will offer auto-complete and other stuff, it is better that our editor gets these features now
Error highlighting is done!
newly added API to handle error highting are:
/**
* @brief squiggle Puts a underline squiggle under text ranges in Editor
* @param level defines the color of the underline depending upon the severity
* @param tooltipMessage The tooltip hover message to show when over selection.
* @note QPair<int, int>: first -> Line number in 1-based indexing
* second -> Character number in 0-based indexing
*/
void squiggle(QCodeEditor::SeverityLevel level, QPair<int, int> startLocation, QPair<int, int> stopLocation, QString tooltipMessage);
/**
* @brief clearSquiggle, Clears complete squiggle from editor
*/
void clearSquiggle();
If you use Language Server with these API, make sure to increment the line number received by LSP before passing for highlighting because of LSP sends the responses with 0-based indexing.
Is your feature request related to a problem? Please describe.
QCodeEditor has many problems, see the issues.
Describe the solution you'd like
Use QScintilla as the editor.
Describe alternatives you've considered
Improve QCodeEditor.
Additional context
It's been discussed on Telegram, open here just for tracking.