CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
517 stars 84 forks source link

✨ Current Line Highlight #34

Closed austincondiff closed 1 year ago

austincondiff commented 2 years ago

Current line needs to be highlighted and current line number is primary text color.

image
NakaokaRei commented 2 years ago

@austincondiff I want to work on this issue! Can you please assign it to me?

austincondiff commented 2 years ago

Sure thing! One thing to note, the top line is highlighted in this screenshot, so it is working however there are two things that need to happen here.

  1. The highlight needs to extend into the gutter. And the separator needs to be removed.
  2. The line number needs to be more prominent (and other line numbers less prominent).
image

We are trying to make it look like this (code folding will come later)...

image

One thing to consider is it might have something to do with STTextView so you may need to submit a PR over there as well.

To get rid of the separator, we need to do the following in STTextViewController.swift...

- rulerView.separatorColor = theme.invisibles
+ rulerView.drawSeparator = false
NakaokaRei commented 2 years ago

@austincondiff Thank you for the advice! I will investigate and report back if I have to change STTextView 🙇

NakaokaRei commented 2 years ago

@austincondiff As far as you can tell, as you are talking about, it doesn't look like I can tackle this issue without changing STTextView. This is difficult for me and I have no prospects for development, so I will remove the assign for now. Sorry 🙇

I think this CodeEdit is a great project and I'll comment as soon as I find an issue I can do myself!

Eliulm commented 1 year ago

I am currently finalizing my pull request for the STTextView repository. With that, we can add line highlighting, just like in Xcode.

austincondiff commented 1 year ago

Closing this as the line highlight has been implemented.