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

Add more outline styles #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Add more outline styles.
  • Loading branch information
joeyespo committed May 3, 2018
commit 85fb0755a2b7c963129c3e13de4628dff3a5fafc
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