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 "highlight current line" #1761

Closed
MarkuBu opened this issue Mar 6, 2022 · 6 comments · Fixed by #2170
Closed

Add "highlight current line" #1761

MarkuBu opened this issue Mar 6, 2022 · 6 comments · Fixed by #2170
Labels
A-helix-term Area: Helix term improvements A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@MarkuBu
Copy link

MarkuBu commented Mar 6, 2022

A standard feature of most editors is highlighting the current line.

This is something I miss in Helix.

@MarkuBu MarkuBu added the C-enhancement Category: Improvements label Mar 6, 2022
@kirawi kirawi added A-theme Area: Theme and appearence related E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors labels Mar 6, 2022
@archseer archseer removed the E-easy Call for participation: Experience needed to fix: Easy / not much label Mar 8, 2022
@trcm
Copy link

trcm commented Apr 6, 2022

I'd like to work on this

@thienpow
Copy link

yes having a current line highlighted is absolutely nice, adding to that the cursor should show | instead of a big block when inserting text. big block cursor should only be shown when not in insert mode

look at this video to "feel" how nice is it with | cursor and full current line highligted
https://www.youtube.com/watch?v=FW2X1CXrU1w

@workingj
Copy link
Contributor

workingj commented Apr 18, 2022

There is a setting for cursor per mode:

[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"

@TobTobXX
Copy link
Contributor

Just gonna drop the term cursorline in here, for anyone searching this in the future. That's what vim calls it.

A consideration that needs to be made (in contrast to many other editors) is that helix can have multiple cursors. Probably all lines should be highlighted then.

@archseer
Copy link
Member

Should be an easy thing to add, there's already code that does this to highlight the current position of the debugger:

surface.set_style(
Rect::new(
area.x,
area.y + (line - view.offset.row) as u16,
area.width,
1,
),
theme.get("ui.highlight"),
);

@archseer archseer added E-easy Call for participation: Experience needed to fix: Easy / not much A-helix-term Area: Helix term improvements labels Apr 19, 2022
@TobTobXX
Copy link
Contributor

TobTobXX commented Apr 19, 2022

Ok, I took my shot at this by patching together the logic from the DAP highlight and gutter highlighting (see TobTobXX@f9f33e0). It works, but only the default theme makes it show up. (Probably bc ui.highlight is a relatively new theme key?)

Still need to implement config...

@TobTobXX TobTobXX mentioned this issue Apr 19, 2022
8 tasks
@the-mikedavis the-mikedavis linked a pull request Jun 20, 2022 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants