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

Refine diagnostics presentation #1710

Merged
merged 12 commits into from
Jun 5, 2021
Merged

Refine diagnostics presentation #1710

merged 12 commits into from
Jun 5, 2021

Conversation

rwols
Copy link
Member

@rwols rwols commented May 31, 2021

If the diagnostic spans one line:

  • Draw errors and warnings as squigglies
  • Draw infos and hints as stippled

If the diagnostic spans more than one line: always draw as a box.

The diagnostics_highlight_style setting is removed, as these provide good
defaults.

Resolves #1547

Infos and hints as stippled:
Schermafbeelding 2021-05-31 om 23 08 23

Warnings and errors as squigglies:
Schermafbeelding 2021-05-31 om 23 09 02

If more than one line: always a box
Schermafbeelding 2021-05-31 om 23 09 50

cc @deathaxe, @kornelski

If the diagnostic spans one line:

- Draw errors and warnings as squigglies
- Draw infos and hints as stippled

If the diagnostic spans more than one line: always draw as a box.

The diagnostics_highlight_style setting is removed, as these provide good
defaults.
@rwols rwols requested review from rchl and predragnikolic May 31, 2021 21:13
@predragnikolic
Copy link
Member

Let see where this goes. 👏

BTW, just noticed one problem, I get no underline if I set "diagnostics_gutter_marker": "", :)

@rchl
Copy link
Member

rchl commented May 31, 2021

Will have a proper look tomorrow but after quick check noticed that warnings are drawn over errors whereas previously it was the other way around.

The most severe issue should be surfaced, I'd think.

Before:
Screenshot 2021-06-01 at 00 23 23

After:
Screenshot 2021-06-01 at 00 25 21

(Also noticed that gutter icon severity that is drawn is the opposite of the region severity. But that's not new and potentially unavoidable)

@rchl
Copy link
Member

rchl commented Jun 1, 2021

Should that logic also apply to symbol highlight?

Screenshot 2021-06-01 at 13 40 33

@deathaxe
Copy link
Contributor

deathaxe commented Jun 1, 2021

grafik

@rwols
Copy link
Member Author

rwols commented Jun 1, 2021

after quick check noticed that warnings are drawn over errors whereas previously it was the other way around.

see 9cff9d3

@rwols
Copy link
Member Author

rwols commented Jun 3, 2021

BTW, just noticed one problem, I get no underline if I set "diagnostics_gutter_marker": "", :)

This behavior also occurs on main, so is worth a separate pull request.

rchl pushed a commit that referenced this pull request Jun 4, 2021
Related: #1710

Remove the "squiggly", "dotted" and "box" options for single-line highlights. "fill" and "underline"
are possible. When set to "fill", "fill" is used for multi-line as well.
@rwols
Copy link
Member Author

rwols commented Jun 4, 2021

The "fill" trick for unnecessary and deprecated tags is also still working

image

Anybody against merging this?

plugin/session_view.py Outdated Show resolved Hide resolved
plugin/core/types.py Outdated Show resolved Hide resolved
plugin/core/types.py Outdated Show resolved Hide resolved
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
@rwols rwols merged commit be4ef8e into main Jun 5, 2021
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.

Hide inline diagnostics if they span multiple lines
4 participants