Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SublimePython.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

// Linter settings
"python_linting": true,
"python_linter_mark_style": "outline", // "none" or "outline"
"python_linter_mark_style": "outline", // "none", "outline", "fill", "solid underline", "squiggly underline", or "stippled underline"
"python_linter_gutter_marks": true,
"python_linter_gutter_marks_theme": "simple", // see folder gutter_mark_themes

Expand Down
15 changes: 14 additions & 1 deletion sublime_python_linting.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
}


UNDERLINE_FLAGS = (
sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE |
sublime.DRAW_EMPTY_AS_OVERWRITE)


def check(view=None):
"""Perform a linter check on the view
"""
Expand Down Expand Up @@ -155,7 +160,15 @@ def _update_lint_marks(view, lines):
"""

style = get_setting('python_linter_mark_style', view, 'outline')
outline_style = {'none': sublime.HIDDEN}
outline_style = {
'none': sublime.HIDDEN,
'fill': sublime.DRAW_NO_OUTLINE,
'solid underline': sublime.DRAW_SOLID_UNDERLINE | UNDERLINE_FLAGS,
'squiggly underline': (
sublime.DRAW_SQUIGGLY_UNDERLINE | UNDERLINE_FLAGS),
'stippled underline': (
sublime.DRAW_STIPPLED_UNDERLINE | UNDERLINE_FLAGS),
}

_erase_lint_marks(view)

Expand Down