QCodeEditor icon indicating copy to clipboard operation
QCodeEditor copied to clipboard

Add Auto complete Function Parsing

Open ouuan opened this issue 6 years ago • 11 comments

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.

ouuan avatar Jan 19 '20 13:01 ouuan

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.

caretaker-claire[bot] avatar Jan 19 '20 13:01 caretaker-claire[bot]

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.

ouuan avatar Jan 19 '20 13:01 ouuan

Yeah sure. I will surely work on implementing this ASAP.

coder3101 avatar Jan 19 '20 13:01 coder3101

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

coder3101 avatar Jan 21 '20 12:01 coder3101

We can add themes manually, though that's a big work. I think it's necessary to support at least one dark theme first.

ouuan avatar Jan 21 '20 12:01 ouuan

Yeah, first let me make it fully functional then we will work on UI aspect of it

coder3101 avatar Jan 21 '20 12:01 coder3101

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.

coder3101 avatar Jan 28 '20 14:01 coder3101

image

image

(from Telegram private messages)

ouuan avatar Jan 29 '20 14:01 ouuan

This needs to become optional, I will still work on this and add as optional feature.

coder3101 avatar Feb 05 '20 16:02 coder3101

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

coder3101 avatar Feb 23 '20 16:02 coder3101

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.

coder3101 avatar Apr 17 '20 10:04 coder3101