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

Add optional line numbers for TextEdit widget #7634

Open
hunger opened this issue Feb 14, 2025 · 3 comments
Open

Add optional line numbers for TextEdit widget #7634

hunger opened this issue Feb 14, 2025 · 3 comments
Labels
a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this

Comments

@hunger
Copy link
Member

hunger commented Feb 14, 2025

Discussed in #7627

Originally posted by nic-obert February 13, 2025
It would be nice to have a built-in option to show line numbers in the TextEdit widget. Or have a dedicated widget called something like TextEditLineNumbers that also allows you to style how the line numbers are displayed.
Such a feature would be useful when building a text editor of some sort or displaying numerous lines of text.

@hunger hunger added a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) enhancement New feature or request labels Feb 14, 2025
@hunger
Copy link
Member Author

hunger commented Feb 14, 2025

Let's track this properly :-)

@ogoffart ogoffart added the priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this label Feb 14, 2025
@ogoffart
Copy link
Member

I think TextEdit might not be the right widget to show code.
We might need a more complex editor that'd have support for showing line number, syntax highlighting and all the things. I'm just not sure if TextEdit is the right widget for that.

@FloVanGH
Copy link
Member

I think TextEdit might not be the right widget to show code. We might need a more complex editor that'd have support for showing line number, syntax highlighting and all the things. I'm just not sure if TextEdit is the right widget for that.

Agree. I think it would make sense to have TextEdit as simple multi line text edit component as it is now and to add a RichTextEditor component for example with text formatting / heightening and (optional) line number. Or a RichTextEdit as same as TextEdit with multiple text formatting and a deriving element CodeEdit with syntax highlighting and line numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) enhancement New feature or request priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
Projects
None yet
Development

No branches or pull requests

3 participants