Skip to content

Commit 85fb075

Browse files
committed
Add more outline styles.
1 parent d70e40a commit 85fb075

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

SublimePython.sublime-settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// Linter settings
2626
"python_linting": true,
27-
"python_linter_mark_style": "outline", // "none" or "outline"
27+
"python_linter_mark_style": "outline", // "none", "outline", "fill", "solid underline", "squiggly underline", or "stippled underline"
2828
"python_linter_gutter_marks": true,
2929
"python_linter_gutter_marks_theme": "simple", // see folder gutter_mark_themes
3030

sublime_python_linting.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
}
6161

6262

63+
UNDERLINE_FLAGS = (
64+
sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE |
65+
sublime.DRAW_EMPTY_AS_OVERWRITE)
66+
67+
6368
def check(view=None):
6469
"""Perform a linter check on the view
6570
"""
@@ -155,7 +160,15 @@ def _update_lint_marks(view, lines):
155160
"""
156161

157162
style = get_setting('python_linter_mark_style', view, 'outline')
158-
outline_style = {'none': sublime.HIDDEN}
163+
outline_style = {
164+
'none': sublime.HIDDEN,
165+
'fill': sublime.DRAW_NO_OUTLINE,
166+
'solid underline': sublime.DRAW_SOLID_UNDERLINE | UNDERLINE_FLAGS,
167+
'squiggly underline': (
168+
sublime.DRAW_SQUIGGLY_UNDERLINE | UNDERLINE_FLAGS),
169+
'stippled underline': (
170+
sublime.DRAW_STIPPLED_UNDERLINE | UNDERLINE_FLAGS),
171+
}
159172

160173
_erase_lint_marks(view)
161174

0 commit comments

Comments
 (0)