|
1 | 1 | from __future__ import annotations |
2 | | -from typing import Any, Optional |
| 2 | +from typing import Any |
3 | 3 | import traceback |
4 | 4 | import inspect |
5 | 5 | import sublime |
@@ -39,31 +39,3 @@ def exception_log(message: str, ex: Exception) -> None: |
39 | 39 | def printf(*args: Any, prefix: str = 'LSP') -> None: |
40 | 40 | """Print args to the console, prefixed by the plugin name.""" |
41 | 41 | print(prefix + ":", *args) |
42 | | - |
43 | | - |
44 | | -def notify(window: sublime.Window | None, message: str, status_message: str = 'LSP: see console log…') -> None: |
45 | | - """Pick either of the 2 ways to show a user notification message: |
46 | | - - via a detailed console message and a short status message |
47 | | - - via a blocking modal dialog""" |
48 | | - from .settings import userprefs |
49 | | - if not window: |
50 | | - return |
51 | | - if userprefs().suppress_error_dialogs: |
52 | | - window.status_message(status_message) |
53 | | - print(message) |
54 | | - else: |
55 | | - sublime.message_dialog(message) |
56 | | - |
57 | | - |
58 | | -def notify_error(window: sublime.Window | None, message: str, status_message: str = '❗LSP: see console log…') -> None: |
59 | | - """Pick either of the 2 ways to show a user error notification message: |
60 | | - - via a detailed console message and a short status message |
61 | | - - via a blocking error modal dialog""" |
62 | | - from .settings import userprefs |
63 | | - if not window: |
64 | | - return |
65 | | - if userprefs().suppress_error_dialogs: |
66 | | - window.status_message(status_message) |
67 | | - print(message) |
68 | | - else: |
69 | | - sublime.error_message(message) |
0 commit comments