CodeEditApp / CodeEditSourceEditor

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

add support for toggling line numbers on and off #124

Closed ben-p-commits closed 1 year ago

ben-p-commits commented 1 year ago

Description

Adds support for #115, ✨Option To Hide Line Numbers. Simply shows/hides ruler view. should be easy enough in the future to include affordances for enabling/disabling code folding ribbon, code review, other rulerview utilities once they come into play.

Demo

line-numbers

austincondiff commented 1 year ago

Should we also shift all content to the left when the line numbers are hidden? Is the space the line numbers were consuming not necessary anymore?

It looks like Xcode does this...

https://user-images.githubusercontent.com/806104/214165962-b9442b9c-0b43-4d04-8cec-1d524e488f50.mov

ben-p-commits commented 1 year ago

@austincondiff - ooh okay, i'll see what I can do

ben-p-commits commented 1 year ago

Update: created a PR over in STTextView to enable this behavior without introducing code smell in CETV...

https://github.com/krzyzanowskim/STTextView/pull/11

@austincondiff - if we can get that change approved: we get the improved behavior:

https://user-images.githubusercontent.com/5067237/214394396-d727682a-f35e-44c9-9204-da3369d67234.mp4

lukepistrol commented 1 year ago

@ben-p-commits Ok lets wait for the outcome of the PR on STTextView for now.

ben-p-commits commented 1 year ago

@lukepistrol, closing this in light of #127