Skip to content

Commit

Permalink
fix: diagnostics line regex
Browse files Browse the repository at this point in the history
this will make sure the last line `1018:1   error   Invalid type "sublime.TextChange.str" mypy`
is also matched. (before this commit that line wasn't matched)

plugin/documents.py:
   3:2   error   Cannot find module named '.completion' mypy
   4:2   error   Cannot find module named '.core.css' mypy
1018:1   error   Invalid type "sublime.TextChange.str" mypy
  • Loading branch information
predrag-codetribe authored and rwols committed Dec 11, 2020
1 parent f3c125f commit b879a25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Syntaxes/Diagnostics.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contexts:
2: punctuation.separator.lsp

line:
- match: ^\s+(?=\d)
- match: ^\s*(?=\d)
push:
- ensure-diag-meta-scope
- expect-source-and-code
Expand Down
2 changes: 1 addition & 1 deletion plugin/core/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def ensure_diagnostics_panel(window: sublime.Window) -> Optional[sublime.View]:
return ensure_panel(window, "diagnostics", r"^(.*):$", r"^\s+(\d+):(\d+)",
return ensure_panel(window, "diagnostics", r"^(.*):$", r"^\s*(\d+):(\d+)",
"Packages/LSP/Syntaxes/Diagnostics.sublime-syntax")


Expand Down

0 comments on commit b879a25

Please sign in to comment.