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

editor: Current line highlight options #11710

Merged
merged 3 commits into from May 13, 2024

Conversation

alygin
Copy link
Contributor

@alygin alygin commented May 11, 2024

This PR adds the current_line_highlight setting that defines how to highlight the current line in the editor:

  • none: Don't highlight the current line.
  • gutter: Highlight the gutter area only.
  • line: Highlight the editor area only.
  • all (default): Highlight the whole line.

The options have been borrowed from VSCode.

Fixes #5222
Part of #4382

Release Notes:

None:

none

Gutter:

gutter

Line:

line

All:

all

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label May 11, 2024
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nice, thank you, I like the gutter-only highlights now 🙂
Let's fix a few small nits and get it merged.

assets/settings/default.json Show resolved Hide resolved
crates/editor/src/element.rs Outdated Show resolved Hide resolved
@SomeoneToIgnore SomeoneToIgnore self-assigned this May 13, 2024
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but needs a rebase.

@SomeoneToIgnore SomeoneToIgnore merged commit 8e92f19 into zed-industries:main May 13, 2024
8 checks passed
@alygin alygin deleted the line-highlight-config branch May 13, 2024 19:04
SomeoneToIgnore added a commit that referenced this pull request May 13, 2024
Follow-up of #11710

Release Notes:

- Removed extra line highlights when deleted diff editors loose focus
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this pull request May 18, 2024
None:

<img width="717" alt="none"
src="https://github.com/zed-industries/zed/assets/2101250/b2a741db-c64a-4275-a612-5a0d15c9cab7">

Gutter:

<img width="715" alt="gutter"
src="https://github.com/zed-industries/zed/assets/2101250/f7a68a6e-6eba-41b4-9042-5a5fe2ee21a4">

Line:

<img width="717" alt="line"
src="https://github.com/zed-industries/zed/assets/2101250/117f5b00-abd7-425b-8047-1a6fab8293a7">

All:

<img width="715" alt="all"
src="https://github.com/zed-industries/zed/assets/2101250/ebccc0da-0fa0-44e5-903c-cc49d975db76">

This PR adds the `current_line_highlight` setting that defines how to
highlight the current line in the editor:

- `none`: Don't highlight the current line.
- `gutter`: Highlight the gutter area only.
- `line`: Highlight the editor area only.
- `all` (default): Highlight the whole line.

The options have been borrowed from VSCode.

Fixes zed-industries#5222
Part of zed-industries#4382

Release Notes:

- Added the `current_line_highlight` setting that defines how to
highlight the current line in the editor (zed-industries#5222).
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this pull request May 18, 2024
…dustries#11772)

Follow-up of zed-industries#11710

Release Notes:

- Removed extra line highlights when deleted diff editors loose focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to disable highlighting of current line
2 participants