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

Config option to hide diagnostics in insert mode #12364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

medzernik
Copy link

@medzernik medzernik commented Dec 29, 2024

Added an ability to hide diagnostics when in insert mode using the following config options:

[editor.inline_diagnostics]
hide-diag-when-insert-mode = true

[editor.gutters]
hide-diag-when-inserting.hide-diagnostics-in-insert-mode = true

Modes other than edit:
image

Same state but in edit mode with config enabled:
image

@medzernik medzernik closed this Dec 29, 2024
@medzernik medzernik reopened this Dec 29, 2024
@nik-rev
Copy link
Contributor

nik-rev commented Dec 29, 2024

I don't understand, this is already the default behaviour for me? When I have inline diagnostics and go into insert mode they hide.

@medzernik
Copy link
Author

I don't understand, this is already the default behaviour for me? When I have inline diagnostics and go into insert mode they hide.

It doesn't hide the gutter diagnostic dots nor the end of line diagnostics. Only hides the inline itself (compresses it to the eol diagnostic form)

@nik-rev
Copy link
Contributor

nik-rev commented Dec 29, 2024

I don't understand, this is already the default behaviour for me? When I have inline diagnostics and go into insert mode they hide.

It doesn't hide the gutter diagnostic dots nor the end of line diagnostics. Only hides the inline itself (compresses it to the eol diagnostic form)

Good point on the end of line diagnostics, but the gutter symbols are useful I reckon. They're not really that obtrusive and provide a good amount of information for how little space they take up e.g. "there are diagnostics on these lines". Especially true if you have underline for diagnostics turned off, in which case it's not possible to tell which lines have diagnostics

@pascalkuthe
Copy link
Member

I don't think EOL and gutter diagnostics are so intrusive that this would be necessary. This can be done in the future pretty trivially once we have a scriptable config option by enabling/disabling EOL diagnostics on mode change events. I don't think it needs to be builtin as yet another config option

@medzernik
Copy link
Author

I don't think EOL and gutter diagnostics are so intrusive that this would be necessary. This can be done in the future pretty trivially once we have a scriptable config option by enabling/disabling EOL diagnostics on mode change events. I don't think it needs to be builtin as yet another config option

To me it was so intrusive, I spent the time to make it happen. Just a personal perference, but to some people it is very intrusive.

@medzernik
Copy link
Author

to add: on reddit it got some upvotes as an idea, so that's also an argument as to why it could be useful: https://www.reddit.com/r/HelixEditor/comments/1hp1ccj/submitted_my_first_pr_for_the_community/

@medzernik
Copy link
Author

I don't understand, this is already the default behaviour for me? When I have inline diagnostics and go into insert mode they hide.

It doesn't hide the gutter diagnostic dots nor the end of line diagnostics. Only hides the inline itself (compresses it to the eol diagnostic form)

Good point on the end of line diagnostics, but the gutter symbols are useful I reckon. They're not really that obtrusive and provide a good amount of information for how little space they take up e.g. "there are diagnostics on these lines". Especially true if you have underline for diagnostics turned off, in which case it's not possible to tell which lines have diagnostics

yeah, I made it so you can pick to leave gutter on and only disable the eol diagnostics

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

Successfully merging this pull request may close these issues.

3 participants