Skip to content

Commit

Permalink
Update diagnostics gutter icons and change default to "sign" (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann authored Oct 14, 2022
1 parent 6aa77ff commit fbbfa5a
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 434 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.style.yapf export-ignore
codecov.yml export-ignore
docs/ export-ignore
icons/convert.bat export-ignore
icons/*.svg export-ignore
mypy.ini export-ignore
stubs/ export-ignore
tests/ export-ignore
Expand Down
2 changes: 1 addition & 1 deletion LSP.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

// Gutter marker for code diagnostics.
// Valid values are "dot", "circle", "bookmark", "sign" or ""
"diagnostics_gutter_marker": "dot",
"diagnostics_gutter_marker": "sign",

// Highlight style of links to internal or external resources, like another text document
// or a web site. Link navigation is implemented via the popup on mouse hover.
Expand Down
35 changes: 0 additions & 35 deletions icons/COPYRIGHT_NOTICE.md

This file was deleted.

416 changes: 21 additions & 395 deletions icons/LICENSE

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions icons/convert.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 16 -h 16 --export-filename=error.png error.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 32 -h 32 --export-filename=error@2x.png error.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 48 -h 48 --export-filename=error@3x.png error.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 16 -h 16 --export-filename=info.png info.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 32 -h 32 --export-filename=info@2x.png info.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 48 -h 48 --export-filename=info@3x.png info.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 16 -h 16 --export-filename=lightbulb.png lightbulb.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 32 -h 32 --export-filename=lightbulb@2x.png lightbulb.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 48 -h 48 --export-filename=lightbulb@3x.png lightbulb.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 16 -h 16 --export-filename=warning.png warning.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 32 -h 32 --export-filename=warning@2x.png warning.svg
inkscape --export-type=png --export-area=-1.23:-1.23:18.46:18.46 -w 48 -h 48 --export-filename=warning@3x.png warning.svg
Binary file modified icons/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/lightbulb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/lightbulb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion plugin/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
("error", "errors", "region.redish markup.error.lsp", "Packages/LSP/icons/error.png", _baseflags | sublime.DRAW_SQUIGGLY_UNDERLINE, sublime.DRAW_NO_FILL), # noqa: E501
("warning", "warnings", "region.yellowish markup.warning.lsp", "Packages/LSP/icons/warning.png", _baseflags | sublime.DRAW_SQUIGGLY_UNDERLINE, sublime.DRAW_NO_FILL), # noqa: E501
("info", "info", "region.bluish markup.info.lsp", "Packages/LSP/icons/info.png", _baseflags | sublime.DRAW_STIPPLED_UNDERLINE, sublime.DRAW_NO_FILL), # noqa: E501
("hint", "hints", "region.bluish markup.info.hint.lsp", "Packages/LSP/icons/info.png", _baseflags | sublime.DRAW_STIPPLED_UNDERLINE, sublime.DRAW_NO_FILL), # noqa: E501
("hint", "hints", "region.bluish markup.info.hint.lsp", "", _baseflags | sublime.DRAW_STIPPLED_UNDERLINE, sublime.DRAW_NO_FILL), # noqa: E501
] # type: List[Tuple[str, str, str, str, int, int]]

# sublime.Kind tuples for sublime.CompletionItem, sublime.QuickPanelItem, sublime.ListInputItem
Expand Down
3 changes: 2 additions & 1 deletion plugin/session_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .core.panels import PanelName
from .core.protocol import ColorInformation
from .core.protocol import Diagnostic
from .core.protocol import DiagnosticSeverity
from .core.protocol import DocumentLink
from .core.protocol import DocumentUri
from .core.protocol import InlayHint
Expand Down Expand Up @@ -68,7 +69,7 @@ def __init__(self, severity: int) -> None:
self.annotations = [] # type: List[str]
_, _, self.scope, self.icon, _, _ = DIAGNOSTIC_SEVERITY[severity - 1]
if userprefs().diagnostics_gutter_marker != "sign":
self.icon = userprefs().diagnostics_gutter_marker
self.icon = "" if severity == DiagnosticSeverity.Hint else userprefs().diagnostics_gutter_marker


class SemanticTokensData:
Expand Down
2 changes: 1 addition & 1 deletion sublime-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"sign",
""
],
"default": "dot",
"default": "sign",
"markdownDescription": "Gutter marker for code diagnostics."
},
"link_highlight_style": {
Expand Down

0 comments on commit fbbfa5a

Please sign in to comment.