Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line numbers #46

Open
brendand opened this issue May 7, 2018 · 4 comments
Open

Line numbers #46

brendand opened this issue May 7, 2018 · 4 comments

Comments

@brendand
Copy link

brendand commented May 7, 2018

Is there a function to display line numbers along the left side of the view? The syntax highlighting is great. Just needs line numbers.

@raspu
Copy link
Owner

raspu commented May 8, 2018

This is not supported yet, and to be honest I don't currently have the time to implement it, but feel free to send a PR if you do so.

@4np
Copy link

4np commented Aug 21, 2018

@RobertoMachorro
Copy link
Collaborator

RobertoMachorro commented Aug 25, 2019

Highlightr just does the coloring using the highlightrjs library - it's an NSTextStorage, but the actual rendering is still done by Cocoa's NSLayoutManager and NSTextContainer.

I'm going to give this a shot using a vertical NSRuler, based on the information in the following links:

Displaying Line Numbers with NSTextView

NSTextView+LineNumberView

NSRulerView how to correctly align line numbers with main text

Flip NSRulerView

If you've achieved this already, please stop me and help a guy out ;)

Edit: Added another link.

@adamwulf
Copy link

Adding another link that has helped me with line numbers: https://github.com/alldritt/TextKit_LineNumbers

it's an old repo but still works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants