Add syntax highlighting with syntect.
This commit is contained in:
@@ -67,7 +67,6 @@ SplitView {
|
||||
// Show the line number.
|
||||
Label {
|
||||
id: numbers
|
||||
|
||||
color: RustColors.linenumber
|
||||
font: textArea.font
|
||||
height: parent.height
|
||||
@@ -79,7 +78,6 @@ SplitView {
|
||||
// Draw edge along the right side of the line number.
|
||||
Rectangle {
|
||||
id: indicator
|
||||
|
||||
anchors.left: numbers.right
|
||||
color: RustColors.linenumber
|
||||
height: parent.height
|
||||
@@ -103,19 +101,17 @@ SplitView {
|
||||
|
||||
TextArea.flickable: TextArea {
|
||||
id: textArea
|
||||
|
||||
color: RustColors.editor_text
|
||||
focus: true
|
||||
persistentSelection: true
|
||||
antialiasing: true
|
||||
selectByMouse: true
|
||||
selectedTextColor: RustColors.editor_highlighted_text
|
||||
selectionColor: RustColors.editor_highlight
|
||||
selectedTextColor: RustColors.editor_highlighted_text
|
||||
textFormat: Qt.AutoText
|
||||
wrapMode: TextArea.Wrap
|
||||
text: FileSystem.readFile(root.filePath)
|
||||
|
||||
background: Rectangle {
|
||||
color: RustColors.editor_background
|
||||
Component.onCompleted: {
|
||||
textArea.text = FileSystem.readFile(FileSystem.filePath)
|
||||
}
|
||||
|
||||
onLinkActivated: function (link) {
|
||||
|
||||
Reference in New Issue
Block a user