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

Fix issues with diagnostics panel toggling on save #2063

Merged
merged 7 commits into from
Sep 26, 2022
Merged

Conversation

rchl
Copy link
Member

@rchl rchl commented Sep 21, 2022

Showing or hiding diagnostics panel on save was generally broken.

  • introducing a first error in the document and quickly saving didn't show the panel
  • fixing last diagnostic and quickly saving didn't close the panel
  • saving document with diagnostics panel open and without making any changes hid and quickly shown the panel, causing flicker

Changes:

  • The code for showing was in SessionBuffer and the code for hiding was in DocumentSyncListener. Now everything is in DocumentSyncListener.

  • Removed AbstractViewListener.diagnostics_async interface as it didn't need to be public (not currently used by anything outside of DocumentSyncListener).

  • DiagnosticsManager class renamed to DiagnosticsStorage since it wasn't really a manager but just glorified session diagnostics storage.

  • Created actual DiagnosticsManager that is an per-window interface to access diagnostics for all sessions. It's not essential currently but I think it's cleaner to have it and we could move more stuff there in the future. REVERTED

  • SessionBuffer.total_errors and SessionBuffer.total_warnings removed as those were unused.

  • Also drive-by fix to fix regression introduced by Only update content of diagnostics panel when visible #2054 where show_diagnostics_count_in_view_status stopped working since the code to update the status was running from update_diagnostics_panel_async which was no longer triggered.

@rchl
Copy link
Member Author

rchl commented Sep 21, 2022

For the sake of reviewers decided to revert introduction of DiagnosticsManager. Might re-introduce it in the future if actually needed.

@predragnikolic
Copy link
Member

predragnikolic commented Sep 22, 2022

Tested this.

Works fine if there is one session that publishes diagnostics. ✔️

Doesn't work if there are 2 sessions that publish diagnostics. (for example LSP-pyright and diagnostics-ls). ⚔️

I noticed that if there are multiple sessions in the view,
the diagnostic panel will not open even if there are diagnostics for one session:

Gif

output1

nor will the panel close if there are no diagnostics:

Gif

output2

Diagnostics-ls configuration
{
  "clients": {
    "diagnostic-ls": {
      "enabled": true,
      "command": [
        "diagnostic-languageserver",
        "--stdio",
        "--log-level",
        "2"
      ],
      "selector": "source.python",
      "initializationOptions": {
        "linters": {
          "cspell": {
            "command": "cspell",
            "debounce": 100,
            "args": [
              "%filepath"
            ],
            "sourceName": "cspell",
            "formatLines": 1,
            "formatPattern": [
              // the error message looks like this:
              // /home/predrag/.config/sublime-text/Packages/Sone/index.py:1:1 - Unknown word (funer)
              ".*?:(\\d+):(\\d+)\\s*-\\s*(.*)",
              {
                "line": 1,
                "column": 2,
                "message": 3,
              }
            ],
          },
          // "flake8": {
          //  "command": "flake8",
          //  "debounce": 100,
          //  "args": [
          //    "--format",
          //    "%(row)d,%(col)d,%(code).1s,%(text)s [%(code)s]",
          //    "-"
          //  ],
          //  "sourceName": "flake8",
          //  "formatLines": 1,
          //  "formatPattern": [
          //    "(\\d+),(\\d+),()([A-Z]),(.*)",
          //    {
          //      "line": 1,
          //      "column": 2,
          //      "security": 3, // Match a zero-length group so everything can be classified as a Warning rather than Error
          //      "message": 5,
          //    }
          //  ],
          //  "securities": {
          //    "": "warning",
          //  },
          // },
        },
        "formatters": {},
        "filetypes": {
          // "python": "cspell",
          // "python": "cspell",
          "python": "flake8",
        },
      },
    },
  }
}

plugin/documents.py Outdated Show resolved Hide resolved
@rchl
Copy link
Member Author

rchl commented Sep 22, 2022

Doesn't work if there are 2 sessions that publish diagnostics. (for example LSP-pyright and diagnostics-ls). ⚔️

I have been testing with 2 active sessions (pyright and pylsp). Maybe there is something special about diagnostics-ls...

@predragnikolic
Copy link
Member

predragnikolic commented Sep 22, 2022

Here are the logs when:

  • the diagnotics panel is closed
  • I open a file that has diagnostics
  • and I press save:
:: --> diagnostic-ls initialize(1): {'capabilities': {'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}, 'workspace': {'inlayHint': {'refreshSupport': True}, 'workspaceFolders': True, 'didChangeWatchedFiles': {'dynamicRegistration': True}, 'semanticTokens': {'refreshSupport': True}, 'codeLens': {'refreshSupport': True}, 'symbol': {'tagSupport': {'valueSet': [1]}, 'symbolKind': {'valueSet': [5, 17, 20, 18, 6, 15, 11, 2, 12, 21, 16, 22, 19, 8, 13, 9, 23, 10, 4, 7, 26, 24, 25, 3, 1, 14]}, 'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'configuration': True, 'executeCommand': {}, 'applyEdit': True, 'didChangeConfiguration': {'dynamicRegistration': True}}, 'textDocument': {'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'publishDiagnostics': {'codeDescriptionSupport': True, 'relatedInformation': True, 'dataSupport': True, 'versionSupport': True, 'tagSupport': {'valueSet': [1, 2]}}, 'documentSymbol': {'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True, 'symbolKind': {'valueSet': [5, 17, 20, 18, 6, 15, 11, 2, 12, 21, 16, 22, 19, 8, 13, 9, 23, 10, 4, 7, 26, 24, 25, 3, 1, 14]}, 'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'semanticTokens': {'requests': {'full': {'delta': True}, 'range': True}, 'tokenTypes': ['class', 'struct', 'keyword', 'string', 'interface', 'parameter', 'function', 'type', 'number', 'enumMember', 'event', 'variable', 'decorator', 'method', 'comment', 'enum', 'regexp', 'property', 'typeParameter', 'macro', 'operator', 'modifier', 'namespace'], 'augmentsSyntaxTokens': True, 'overlappingTokenSupport': False, 'formats': ['relative'], 'tokenModifiers': ['abstract', 'static', 'deprecated', 'declaration', 'async', 'documentation', 'defaultLibrary', 'modification', 'definition', 'readonly'], 'multilineTokenSupport': True, 'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'synchronization': {'willSaveWaitUntil': True, 'willSave': True, 'didSave': True, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'dataSupport': True, 'isPreferredSupport': True, 'resolveSupport': {'properties': ['edit']}, 'disabledSupport': True, 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'documentLink': {'tooltipSupport': True, 'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'activeParameterSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}, 'contextSupport': True, 'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'completion': {'insertTextMode': 2, 'completionItem': {'snippetSupport': True, 'deprecatedSupport': True, 'labelDetailsSupport': True, 'insertReplaceSupport': True, 'tagSupport': {'valueSet': [1]}, 'documentationFormat': ['markdown', 'plaintext'], 'insertTextModeSupport': {'valueSet': [2]}, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}}, 'completionItemKind': {'valueSet': [19, 5, 21, 7, 12, 11, 9, 3, 16, 20, 18, 8, 6, 4, 22, 13, 2, 1, 10, 25, 23, 24, 14, 17, 15]}, 'dynamicRegistration': True}, 'inlayHint': {'resolveSupport': {'properties': ['textEdits', 'label.command']}, 'dynamicRegistration': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}}}, 'clientInfo': {'version': '1.18.0', 'name': 'Sublime Text LSP'}, 'rootPath': '/home/predragnikolic/.config/sublime-text/Packages/LSP', 'workspaceFolders': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'name': 'LSP'}], 'processId': 48789, 'rootUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'initializationOptions': {'filetypes': {'python': 'flake8'}, 'formatters': {}, 'linters': {'cspell': {'command': 'cspell', 'formatLines': 1, 'formatPattern': ['.*?:(\\d+):(\\d+)\\s*-\\s*(.*)', {'line': 1, 'column': 2, 'message': 3}], 'args': ['%filepath'], 'sourceName': 'cspell', 'debounce': 100}}}}
:: <<< diagnostic-ls 1: {'capabilities': {'documentFormattingProvider': True, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'save': {}, 'didClose': {}}}}
::  -> diagnostic-ls initialized: {}
::  -> diagnostic-ls textDocument/didOpen: {'textDocument': {'languageId': 'python', 'version': 0, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'text': '# Stubs for sublime (Python 3.5)\n#\n# NOTE: This dynamically typed stub was automatically generated by stubgen.\n\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Reversible, Sequence, Tuple, Union\n\n\nclass _LogWriter:\n    def flush(self) -> None:\n        ...\n\n    def write(self, s: str) -> None\n        ...\n\n\nHOVER_TEXT = ...  # type: int\nHOVER_GUTTER = ...  # type: int\nHOVER_MARGIN = ...  # type: int\nENCODED_POSITION = ...  # type: int\nTRANSIENT = ...  # type: int\nSEMI_TRANSIENT = ...  # type: int\nFORCE_GROUP = ...  # type: int\nADD_TO_SELECTION = ...  # type: int\nREPLACE_MRU = ...  # type: int\nCLEAR_TO_RIGHT = ...  # type: int\nIGNORECASE = ...  # type: int\nLITERAL = ...  # type: int\nMONOSPACE_FONT = ...  # type: int\nKEEP_OPEN_ON_FOCUS_LOST = ...  # type: int\nHTML = ...  # type: int\nCOOPERATE_WITH_AUTO_COMPLETE = ...  # type: int\nHIDE_ON_MOUSE_MOVE = ...  # type: int\nHIDE_ON_MOUSE_MOVE_AWAY = ...  # type: int\nKEEP_ON_SELECTION_MODIFIED = ...  # type: int\nDRAW_EMPTY = ...  # type: int\nHIDE_ON_MINIMAP = ...  # type: int\nDRAW_EMPTY_AS_OVERWRITE = ...  # type: int\nPERSISTENT = ...  # type: int\nDRAW_OUTLINED = ...  # type: int\nDRAW_NO_FILL = ...  # type: int\nDRAW_NO_OUTLINE = ...  # type: int\nDRAW_SOLID_UNDERLINE = ...  # type: int\nDRAW_STIPPLED_UNDERLINE = ...  # type: int\nDRAW_SQUIGGLY_UNDERLINE = ...  # type: int\nHIDDEN = ...  # type: int\nOP_EQUAL = ...  # type: int\nOP_NOT_EQUAL = ...  # type: int\nOP_REGEX_MATCH = ...  # type: int\nOP_NOT_REGEX_MATCH = ...  # type: int\nOP_REGEX_CONTAINS = ...  # type: int\nOP_NOT_REGEX_CONTAINS = ...  # type: int\nCLASS_WORD_START = ...  # type: int\nCLASS_WORD_END = ...  # type: int\nCLASS_PUNCTUATION_START = ...  # type: int\nCLASS_PUNCTUATION_END = ...  # type: int\nCLASS_SUB_WORD_START = ...  # type: int\nCLASS_SUB_WORD_END = ...  # type: int\nCLASS_LINE_START = ...  # type: int\nCLASS_LINE_END = ...  # type: int\nCLASS_EMPTY_LINE = ...  # type: int\nINHIBIT_WORD_COMPLETIONS = ...  # type: int\nINHIBIT_EXPLICIT_COMPLETIONS = ...  # type: int\nINHIBIT_REORDER = ...  # type: int\nDYNAMIC_COMPLETIONS = ...  # type: int\nCOMPLETION_FLAG_KEEP_PREFIX = ...  # type: int\nDIALOG_CANCEL = ...  # type: int\nDIALOG_YES = ...  # type: int\nDIALOG_NO = ...  # type: int\nUI_ELEMENT_SIDE_BAR = ...  # type: int\nUI_ELEMENT_MINIMAP = ...  # type: int\nUI_ELEMENT_TABS = ...  # type: int\nUI_ELEMENT_STATUS_BAR = ...  # type: int\nUI_ELEMENT_MENU = ...  # type: int\nUI_ELEMENT_OPEN_FILES = ...  # type: int\nLAYOUT_INLINE = ...  # type: int\nLAYOUT_BELOW = ...  # type: int\nLAYOUT_BLOCK = ...  # type: int\nKIND_ID_AMBIGUOUS = ...  # type: int\nKIND_ID_KEYWORD = ...  # type: int\nKIND_ID_TYPE = ...  # type: int\nKIND_ID_COLOR_DARK = ... # type: int\nKIND_ID_COLOR_LIGHT = ... # type: int\nKIND_ID_COLOR_BLUISH = ... # type: int\nKIND_ID_COLOR_CYANISH = ... # type: int\nKIND_ID_COLOR_GREENISH = ... # type: int\nKIND_ID_COLOR_ORANGISH = ... # type: int\nKIND_ID_COLOR_PINKISH = ... # type: int\nKIND_ID_COLOR_PURPLISH = ... # type: int\nKIND_ID_COLOR_REDISH = ... # type: int\nKIND_ID_COLOR_YELLOWISH = ... # type: int\nKIND_ID_FUNCTION = ...  # type: int\nKIND_ID_NAMESPACE = ...  # type: int\nKIND_ID_NAVIGATION = ...  # type: int\nKIND_ID_MARKUP = ...  # type: int\nKIND_ID_VARIABLE = ...  # type: int\nKIND_ID_SNIPPET = ...  # type: int\nKIND_AMBIGUOUS = ...  # type: Tuple[int, str, str]\nKIND_KEYWORD = ...  # type: Tuple[int, str, str]\nKIND_TYPE = ...  # type: Tuple[int, str, str]\nKIND_FUNCTION = ...  # type: Tuple[int, str, str]\nKIND_NAMESPACE = ...  # type: Tuple[int, str, str]\nKIND_NAVIGATION = ...  # type: Tuple[int, str, str]\nKIND_MARKUP = ...  # type: Tuple[int, str, str]\nKIND_VARIABLE = ...  # type: Tuple[int, str, str]\nKIND_SNIPPET = ...  # type: Tuple[int, str, str]\nCOMPLETION_FORMAT_TEXT = ...  # type: int\nCOMPLETION_FORMAT_SNIPPET = ...  # type: int\nWANT_EVENT = ...  # type: int\n\n\nclass Settings:\n    settings_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def get(self, key: str, default: Optional[Any] = ...) -> Optional[Any]:\n        ...\n\n    def has(self, key: str) -> bool:\n        ...\n\n    def set(self, key: str, value: Any) -> None:\n        ...\n\n    def erase(self, key: str) -> None:\n        ...\n\n    def add_on_change(self, tag: str, callback: Callable[[], None]) -> None:\n        ...\n\n    def clear_on_change(self, tag: str) -> None:\n        ...\n\n\ndef version() -> str:\n    ...\n\n\ndef platform() -> str:\n    ...\n\n\ndef arch() -> str:\n    ...\n\n\ndef channel() -> str:\n    ...\n\n\ndef executable_path() -> str:\n    ...\n\n\ndef executable_hash() -> str:\n    ...\n\n\ndef packages_path() -> str:\n    ...\n\n\ndef installed_packages_path() -> str:\n    ...\n\n\ndef cache_path() -> str:\n    ...\n\n\ndef status_message(msg: str) -> None:\n    ...\n\n\ndef error_message(msg: str) -> None:\n    ...\n\n\ndef message_dialog(msg: str) -> None:\n    ...\n\n\ndef ok_cancel_dialog(msg: str, ok_title: str = ...) -> bool:\n    ...\n\n\ndef yes_no_cancel_dialog(msg: str, yes_title: str = ..., no_title: str = ...) -> int:\n    ...\n\n\ndef run_command(cmd: str, args: Optional[Any] = ...) -> None:\n    ...\n\n\ndef get_clipboard(size_limit: int = ...) -> str:\n    ...\n\n\ndef set_clipboard(text: str) -> None:\n    ...\n\n\ndef log_commands(flag: bool) -> None:\n    ...\n\n\ndef log_input(flag: bool) -> None:\n    ...\n\n\ndef log_result_regex(flag: bool) -> None:\n    ...\n\n\ndef log_indexing(flag: bool) -> None:\n    ...\n\n\ndef log_build_systems(flag: bool) -> None:\n    ...\n\n\ndef score_selector(scope_name: str, selector: str) -> int:\n    ...\n\n\ndef load_resource(name: str) -> str:\n    ...\n\n\ndef load_binary_resource(name: str) -> bytes:\n    ...\n\n\ndef find_resources(pattern: str) -> Sequence[str]:\n    ...\n\n\ndef encode_value(val: Any, pretty: bool = ...) -> str:\n    ...\n\n\ndef decode_value(data: str) -> Any:\n    ...\n\n\ndef expand_variables(val: Any, variables: dict) -> Any:\n    ...\n\n\ndef load_settings(base_name: str) -> Settings:\n    ...\n\n\ndef save_settings(base_name: str) -> None:\n    ...\n\n\ndef set_timeout(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef set_timeout_async(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef active_window() -> \'Window\':\n    ...\n\n\ndef windows() -> \'Sequence[Window]\':\n    ...\n\n\ndef get_macro() -> Sequence[dict]:\n    ...\n\n\ndef syntax_from_path(syntax_path: str) -> Optional[Syntax]:\n    ...\n\n\ndef command_url(cmd: str, args: Optional[dict] = ...) -> str:\n    ...\n\n\nclass Syntax:\n    path = ...  # type: str\n    name = ...  # type: str\n    hidden = ...  # type: bool\n    scope = ...  # type: str\n\n    def __init__(self, path: str, name: str, hidden: bool, scope: str) -> None:\n        ...\n\n\nclass CompletionItem:\n    flags = ...  # type: int\n    details = ...  # type: str\n    annotation = ...  # type: str\n    kind = ...  # type: Tuple[int, str, str]\n\n    def __init__(\n            self,\n            trigger: str,\n            annotation: str = "",\n            completion: str = "",\n            completion_format: int = COMPLETION_FORMAT_TEXT,\n            kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n            details: str = "") -> None:\n        ...\n\n    @classmethod\n    def snippet_completion(\n            cls,\n            trigger: str,\n            snippet: str,\n            annotation: str = " ",\n            kind: Tuple[int, str, str] = KIND_SNIPPET,\n            details: str = "") -> \'CompletionItem\':\n        ...\n\n    @classmethod\n    def command_completion(cls,\n                           trigger: str,\n                           command: str,\n                           args: dict = {},\n                           annotation: str = "",\n                           kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n                           details: str = ""\n                           ) -> \'CompletionItem\':\n        ...\n\n\nclass CompletionList:\n    def set_completions(self, completions: List[CompletionItem], flags: int = 0) -> None:\n        ...\n\n\nclass Window:\n    window_id = ...  # type: int\n    settings_object = ...  # type: Settings\n    template_settings_object = ...  # type: Any\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    # def hwnd(self): ...\n    def active_sheet(self) -> \'Sheet\':\n        ...\n\n    def active_view(self) -> \'Optional[View]\':\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def new_file(self, flags: int = ..., syntax: str = ...) -> \'View\':\n        ...\n\n    def open_file(self, fname: str, flags: int = ..., group: int = ...) -> \'View\':\n        ...\n\n    def find_open_file(self, fname: str) -> \'Optional[View]\':\n        ...\n\n    def num_groups(self) -> int:\n        ...\n\n    def active_group(self) -> int:\n        ...\n\n    def focus_group(self, idx: int) -> None:\n        ...\n\n    def focus_sheet(self, sheet: \'Sheet\') -> None:\n        ...\n\n    def focus_view(self, view: \'View\') -> None:\n        ...\n\n    def get_sheet_index(self, sheet: \'Sheet\') -> Tuple[int, int]:\n        ...\n\n    def get_view_index(self, view: \'View\') -> Tuple[int, int]:\n        ...\n\n    def set_sheet_index(self, sheet: \'Sheet\', group: int, idx: int) -> None:\n        ...\n\n    def set_view_index(self, view: \'View\', group: int, idx: int) -> None:\n        ...\n\n    def sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views(self) -> \'List[View]\':\n        ...\n\n    def active_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def active_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    def sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views_in_group(self, group: int) -> \'List[View]\':\n        ...\n\n    def transient_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def transient_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    # def layout(self): ...\n    # def get_layout(self): ...\n    # def set_layout(self, layout): ...\n    def create_output_panel(self, name: str, unlisted: bool = ...) -> \'View\':\n        ...\n\n    def find_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def destroy_output_panel(self, name: str) -> None:\n        ...\n\n    def active_panel(self) -> Optional[str]:\n        ...\n\n    def panels(self) -> List[str]:\n        ...\n\n    def get_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def show_input_panel(self, caption: str, initial_text: str, on_done: Optional[Callable],\n                         on_change: Optional[Callable], on_cancel: Optional[Callable]) -> \'View\':\n        ...\n\n    def show_quick_panel(self,\n                         items: List[Any],\n                         on_select: Callable,\n                         flags: int = ...,\n                         selected_index: int = ...,\n                         on_highlight: Optional[Callable] = ...,\n                         placeholder: Optional[str] = ...) -> None:\n        ...\n\n    def is_sidebar_visible(self) -> bool:\n        ...\n\n    def set_sidebar_visible(self, flag: bool) -> None:\n        ...\n\n    def is_minimap_visible(self) -> bool:\n        ...\n\n    def set_minimap_visible(self, flag: bool) -> None:\n        ...\n\n    def is_status_bar_visible(self) -> bool:\n        ...\n\n    def set_status_bar_visible(self, flag: bool) -> None:\n        ...\n\n    def get_tabs_visible(self) -> bool:\n        ...\n\n    def set_tabs_visible(self, flag: bool) -> None:\n        ...\n\n    def is_menu_visible(self) -> bool:\n        ...\n\n    def set_menu_visible(self, flag: bool) -> None:\n        ...\n\n    def folders(self) -> List[str]:\n        ...\n\n    def project_file_name(self) -> str:\n        ...\n\n    def project_data(self) -> Optional[dict]:\n        ...\n\n    def set_project_data(self, v: Union[dict, None]) -> None:\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def template_settings(self): ...\n    def lookup_symbol_in_index(self, sym: str) -> List[str]:\n        ...\n\n    def lookup_symbol_in_open_files(self, sym: str) -> List[str]:\n        ...\n\n    def extract_variables(self) -> dict:\n        ...\n\n    def status_message(self, msg: str) -> None:\n        ...\n\n\nclass Edit:\n    edit_token = ...  # type: Any\n\n    def __init__(self, token: Any) -> None:\n        ...\n\n\nclass Region:\n    a = ...  # type: int\n    b = ...  # type: int\n    xpos = ...  # type: int\n\n    def __init__(self, a: int, b: Optional[int] = ..., xpos: int = ...) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n    def __lt__(self, rhs: object) -> bool:\n        ...\n\n    def empty(self) -> bool:\n        ...\n\n    def begin(self) -> int:\n        ...\n\n    def end(self) -> int:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    def contains(self, x: \'Union[Region, int]\') -> bool:\n        ...\n\n    def cover(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersection(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersects(self, rhs: \'Region\') -> bool:\n        ...\n\n    def to_tuple(self) -> Tuple[int, int]:\n        ...\n\n\nclass Selection(Reversible):\n    view_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __reversed__(self) -> Iterator[Region]:\n        ...\n\n    def __iter__(self) -> Iterator[Region]:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __getitem__(self, index: int) -> Region:\n        ...\n\n    def __delitem__(self, index: int) -> None:\n        ...\n\n    def __eq__(self, rhs: Any) -> bool:\n        ...\n\n    def __lt__(self, rhs: Any) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def clear(self) -> None:\n        ...\n\n    def add(self, x: Union[Region, int]) -> None:\n        ...\n\n    def add_all(self, regions: Iterator[Union[Region, int]]) -> None:\n        ...\n\n    def subtract(self, region: Region) -> None:\n        ...\n\n    def contains(self, region: Region) -> bool:\n        ...\n\n\nclass Sheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def group(self) -> int:\n        ...\n\n    def view(self) -> \'Optional[View]\':\n        ...\n\n    def is_semi_transient(self) -> bool:\n        ...\n\n    def is_transient(self) -> bool:\n        ...\n\n\nclass HtmlSheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def set_contents(self, contents: str) -> None:\n        ...\n\n\nclass ContextStackFrame:\n    context_name = ... # type: str\n    source_file = ... # type: str\n    source_location = ... # type: Tuple[int, int]\n\n\nclass View:\n    view_id = ...  # type: Any\n    selection = ...  # type: Any\n    settings_object = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def sheet(self) -> Sheet:\n        ...\n\n    def syntax(self) -> Any:\n        ...\n\n    def element(self) -> Optional[str]:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def buffer(self) -> "Optional[Buffer]":\n        ...\n\n    def buffer_id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def is_primary(self) -> bool:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def file_name(self) -> Optional[str]:\n        ...\n\n    def close(self) -> None:\n        ...\n\n    def retarget(self, new_fname: str) -> None:\n        ...\n\n    def name(self) -> str:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def is_loading(self) -> bool:\n        ...\n\n    def is_dirty(self) -> bool:\n        ...\n\n    def is_read_only(self) -> bool:\n        ...\n\n    def set_read_only(self, read_only: bool) -> None:\n        ...\n\n    def is_scratch(self) -> bool:\n        ...\n\n    def set_scratch(self, scratch: bool) -> None:\n        ...\n\n    def encoding(self) -> str:\n        ...\n\n    def set_encoding(self, encoding_name: str) -> None:\n        ...\n\n    def line_endings(self) -> str:\n        ...\n\n    def set_line_endings(self, line_ending_name: str) -> None:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    # def begin_edit(self, edit_token, cmd, args: Optional[Any] = ...) -> Edit: ...\n    # def end_edit(self, edit: Edit) -> None: ...\n    def is_in_edit(self) -> bool:\n        ...\n\n    def insert(self, edit: Edit, pt: int, text: str) -> None:\n        ...\n\n    def erase(self, edit: Edit, r: Region) -> None:\n        ...\n\n    def replace(self, edit: Edit, r: Region, text: str) -> None:\n        ...\n\n    def change_count(self) -> int:\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def sel(self) -> Selection:\n        ...\n\n    def substr(self, x: Union[Region, int]) -> str:\n        ...\n\n    def find(self, pattern: str, start_pt: int, flags: int = ...) -> Optional[Region]:\n        ...\n\n    def find_all(self, pattern: str, flags: int = ..., fmt: Optional[Any] = ...,\n                 extractions: Optional[Any] = ...) -> \'List[Region]\':\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def meta_info(self, key, pt: int): ...\n    def extract_scope(self, pt: int) -> Region:\n        ...\n\n    def scope_name(self, pt: int) -> str:\n        ...\n\n    def context_backtrace(self, pt: int) -> Union[List[ContextStackFrame], List[str]]:\n        ...\n\n    def match_selector(self, pt: int, selector: str) -> bool:\n        ...\n\n    def score_selector(self, pt: int, selector: str) -> int:\n        ...\n\n    def find_by_selector(self, selector: str) -> List[Region]:\n        ...\n\n    # def indented_region(self, pt: int): ...\n    # def indentation_level(self, pt: int): ...\n    def has_non_empty_selection_region(self) -> bool:\n        ...\n\n    def lines(self, r: Region) -> List[Region]:\n        ...\n\n    def split_by_newlines(self, r: Region) -> List[Region]:\n        ...\n\n    def line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def full_line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def word(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def classify(self, pt: int) -> int:\n        ...\n\n    def find_by_class(self, pt: int, forward: bool, classes: int, separators: str = ...) -> int:\n        ...\n\n    def expand_by_class(self, x: Union[Region, int], classes: int, separators: str = ...) -> Region:\n        ...\n\n    def rowcol(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf8(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf16(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def text_point(self, row: int, col: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf8(self, row: int, col_utf8: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf16(self, row: int, col_utf16: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def visible_region(self) -> Region:\n        ...\n\n    def show(self, x: Union[Selection, Region, int], show_surrounds: bool = ...) -> None:\n        ...\n\n    def show_at_center(self, x: Union[Selection, Region, int], animate: bool = True) -> None:\n        ...\n\n    def viewport_position(self) -> Tuple[int, int]:\n        ...\n\n    def set_viewport_position(self, xy: Tuple[int, int], animate: bool = ...) -> None:\n        ...\n\n    def viewport_extent(self) -> Tuple[int, int]:\n        ...\n\n    def layout_extent(self) -> Tuple[int, int]:\n        ...\n\n    def text_to_layout(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def layout_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def window_to_layout(self, xy: Tuple[int, int]) -> Tuple[int, int]:\n        ...\n\n    def window_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def line_height(self) -> float:\n        ...\n\n    def em_width(self) -> float:\n        ...\n\n    # def is_folded(self, sr) -> bool: ...\n    # def folded_regions(self): ...\n    def fold(self, x: Union[Region, List[Region]]) -> bool:\n        ...\n\n    def unfold(self, x: Union[Region, List[Region]]) -> List[Region]:\n        ...\n\n    def add_regions(self, key: str, regions: List[Region], scope: str = ..., icon: str = ..., flags: int = ...,\n                    annotations: List[str] = ..., annotation_color: str = ...,\n                    on_navigate: Callable[[str], None] = ..., on_close: Callable[[], None] = ...) -> None:\n        ...\n\n    def get_regions(self, key: str) -> List[Region]:\n        ...\n\n    def erase_regions(self, key: str) -> None:\n        ...\n\n    # def add_phantom(self, key: str, region: Region, content: str, layout, on_navigate: Optional[Any] = ...): ...\n    # def erase_phantoms(self, key: str) -> None: ...\n    # def erase_phantom_by_id(self, pid) -> None: ...\n    # def query_phantom(self, pid): ...\n    # def query_phantoms(self, pids): ...\n    def assign_syntax(self, syntax_file: str) -> None:\n        ...\n\n    def set_syntax_file(self, syntax_file: str) -> None:\n        ...\n\n    def symbols(self) -> List[Tuple[Region, str]]:\n        ...\n\n    # def get_symbols(self): ...\n    # def indexed_symbols(self): ...\n    def set_status(self, key: str, value: str) -> None:\n        ...\n\n    def get_status(self, key: str) -> str:\n        ...\n\n    def erase_status(self, key: str) -> None:\n        ...\n\n    # def extract_completions(self, prefix: str, tp: int = ...): ...\n    # def find_all_results(self): ...\n    # def find_all_results_with_text(self): ...\n    def command_history(self, delta: int, modifying_only: bool = ...) -> \'Tuple[str, dict, int]\':\n        ...\n\n    def overwrite_status(self) -> bool:\n        ...\n\n    def set_overwrite_status(self, value: bool) -> None:\n        ...\n\n    def show_popup_menu(self, items: List[str], on_select: \'Callable\', flags: int = ...) -> None:\n        ...\n\n    def show_popup(self,\n                   content: str,\n                   flags: int = ...,\n                   location: int = ...,\n                   max_width: int = ...,\n                   max_height: int = ...,\n                   on_navigate: Optional[Any] = ...,\n                   on_hide: Optional[Any] = ...) -> None:\n        ...\n\n    def update_popup(self, content: str) -> None:\n        ...\n\n    def is_popup_visible(self) -> bool:\n        ...\n\n    def hide_popup(self) -> None:\n        ...\n\n    def is_auto_complete_visible(self) -> bool:\n        ...\n\n    def change_id(self) -> Any:  # opaque handle object\n        ...\n\n    def transform_region_from(self, region: Region, change_id: Any) -> Region:\n        ...\n\n    def style_for_scope(self, scope: str) -> Dict[str, str]:\n        ...\n\n\nclass Buffer:\n    buffer_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def views(self) -> Optional[List[View]]:\n        ...\n\n    def primary_view(self) -> Optional[View]:\n        ...\n\n\nclass Phantom:\n    region = ...  # type: Region\n    content = ...  # type: Any\n    layout = ...  # type: Any\n    on_navigate = ...  # type: Any\n    id = ...  # type: Any\n\n    def __init__(self, region: Region, content: str, layout: int, on_navigate: Optional[Any] = ...) -> None:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n\nclass PhantomSet:\n    view = ...  # type: View\n    key = ...  # type: Any\n    phantoms = ...  # type: Any\n\n    def __init__(self, view: View, key: str = ...) -> None:\n        ...\n\n    def __del__(self) -> None:\n        ...\n\n    def update(self, new_phantoms: Sequence[Phantom]) -> None:\n        ...\n\n\nclass HistoricPosition:\n    pt = ...  # type: int\n    row = ...  # type: int\n    col = ...  # type: int\n    col_utf16 = ...  # type: int\n    col_utf8 = ...  # type: int\n\n\nclass TextChange:\n    a = ...  # type: HistoricPosition\n    b = ...  # type: HistoricPosition\n    str = ...  # type: str\n    len_utf8 = ...  # type: int\n    len_utf16 = ...  # type: int\n\n\nclass QuickPanelItem:\n    def __init__(\n        self,\n        trigger: str,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass ListInputItem:\n    def __init__(\n        self,\n        text: str,\n        value: Any,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass Html:\n    def __init__(\n        self,\n        text: str,\n    ) -> None:\n        ...\n'}}
:: --> LSP-pyright initialize(1): {'capabilities': {'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}, 'workspace': {'inlayHint': {'refreshSupport': True}, 'workspaceFolders': True, 'didChangeWatchedFiles': {'dynamicRegistration': True}, 'semanticTokens': {'refreshSupport': True}, 'codeLens': {'refreshSupport': True}, 'symbol': {'tagSupport': {'valueSet': [1]}, 'symbolKind': {'valueSet': [5, 17, 20, 18, 6, 15, 11, 2, 12, 21, 16, 22, 19, 8, 13, 9, 23, 10, 4, 7, 26, 24, 25, 3, 1, 14]}, 'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'configuration': True, 'executeCommand': {}, 'applyEdit': True, 'didChangeConfiguration': {'dynamicRegistration': True}}, 'textDocument': {'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'publishDiagnostics': {'codeDescriptionSupport': True, 'relatedInformation': True, 'dataSupport': True, 'versionSupport': True, 'tagSupport': {'valueSet': [1, 2]}}, 'documentSymbol': {'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True, 'symbolKind': {'valueSet': [5, 17, 20, 18, 6, 15, 11, 2, 12, 21, 16, 22, 19, 8, 13, 9, 23, 10, 4, 7, 26, 24, 25, 3, 1, 14]}, 'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'semanticTokens': {'requests': {'full': {'delta': True}, 'range': True}, 'tokenTypes': ['class', 'struct', 'keyword', 'string', 'interface', 'parameter', 'function', 'type', 'number', 'enumMember', 'event', 'variable', 'decorator', 'method', 'comment', 'enum', 'regexp', 'property', 'typeParameter', 'macro', 'operator', 'modifier', 'namespace'], 'augmentsSyntaxTokens': True, 'overlappingTokenSupport': False, 'formats': ['relative'], 'tokenModifiers': ['abstract', 'static', 'deprecated', 'declaration', 'async', 'documentation', 'defaultLibrary', 'modification', 'definition', 'readonly'], 'multilineTokenSupport': True, 'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'synchronization': {'willSaveWaitUntil': True, 'willSave': True, 'didSave': True, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'dataSupport': True, 'isPreferredSupport': True, 'resolveSupport': {'properties': ['edit']}, 'disabledSupport': True, 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'documentLink': {'tooltipSupport': True, 'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'activeParameterSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}, 'contextSupport': True, 'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'completion': {'insertTextMode': 2, 'completionItem': {'snippetSupport': True, 'deprecatedSupport': True, 'labelDetailsSupport': True, 'insertReplaceSupport': True, 'tagSupport': {'valueSet': [1]}, 'documentationFormat': ['markdown', 'plaintext'], 'insertTextModeSupport': {'valueSet': [2]}, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}}, 'completionItemKind': {'valueSet': [19, 5, 21, 7, 12, 11, 9, 3, 16, 20, 18, 8, 6, 4, 22, 13, 2, 1, 10, 25, 23, 24, 14, 17, 15]}, 'dynamicRegistration': True}, 'inlayHint': {'resolveSupport': {'properties': ['textEdits', 'label.command']}, 'dynamicRegistration': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}}}, 'clientInfo': {'version': '1.18.0', 'name': 'Sublime Text LSP'}, 'rootPath': '/home/predragnikolic/.config/sublime-text/Packages/LSP', 'workspaceFolders': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'name': 'LSP'}], 'processId': 48789, 'rootUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'initializationOptions': {}}
LSP-pyright: Pyright language server 1.1.272 starting
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Pyright language server 1.1.272 starting'}
LSP-pyright: Server root directory: /home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/14.17.6/language-server/node_modules/pyright/dist/
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Server root directory: /home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/14.17.6/language-server/node_modules/pyright/dist/'}
LSP-pyright: Starting service instance "LSP"
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Starting service instance "LSP"'}
:: <<< LSP-pyright 1: {'capabilities': {'hoverProvider': {'workDoneProgress': True}, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.', '['], 'workDoneProgress': True, 'completionItem': {'labelDetailsSupport': True}}, 'signatureHelpProvider': {'workDoneProgress': True, 'triggerCharacters': ['(', ',', ')']}, 'codeActionProvider': {'workDoneProgress': True, 'codeActionKinds': ['quickfix', 'source.organizeImports']}, 'executeCommandProvider': {'commands': [], 'workDoneProgress': True}, 'declarationProvider': {'workDoneProgress': True}, 'workspaceSymbolProvider': {'workDoneProgress': True}, 'typeDefinitionProvider': {'workDoneProgress': True}, 'documentHighlightProvider': {'workDoneProgress': True}, 'definitionProvider': {'workDoneProgress': True}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'save': {}, 'didClose': {}}, 'documentSymbolProvider': {'workDoneProgress': True}, 'renameProvider': {'workDoneProgress': True, 'prepareProvider': True}, 'referencesProvider': {'workDoneProgress': True}, 'callHierarchyProvider': True}}
::  -> LSP-pyright initialized: {}
::  -> LSP-pyright workspace/didChangeConfiguration: {'settings': {'python': {'analysis': {'autoSearchPaths': True, 'diagnosticMode': 'openFilesOnly', 'autoImportCompletions': True, 'typeCheckingMode': 'basic', 'typeshedPaths': [], 'useLibraryCodeForTypes': True, 'extraPaths': ['/home/predragnikolic/.config/sublime-text/Packages/LSP/libs', '/home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/resources/typings/sublime_text', '/opt/sublime_text/Lib/python38', '/opt/sublime_text/Lib/python3', '/home/predragnikolic/.config/sublime-text/Lib/python38', '/opt/sublime_text/Packages', '/home/predragnikolic/.config/sublime-text/Packages/sublime_lib/st3', '/home/predragnikolic/.config/sublime-text/Packages/lsp_utils/st3', '/home/predragnikolic/.config/sublime-text/Packages/shellenv/all', '/home/predragnikolic/.config/sublime-text/Packages/coverage/st3_linux_x64', '/home/predragnikolic/.config/sublime-text/Packages/backrefs/st3', '/home/predragnikolic/.config/sublime-text/Packages/bracex/st3', '/home/predragnikolic/.config/sublime-text/Packages/pathlib/all', '/home/predragnikolic/.config/sublime-text/Packages/pyyaml/st3', '/home/predragnikolic/.config/sublime-text/Packages/typing/st3', '/home/predragnikolic/.config/sublime-text/Packages/jsonschema/all', '/home/predragnikolic/.config/sublime-text/Packages/mdpopups/st3', '/home/predragnikolic/.config/sublime-text/Packages/wcmatch/st3', '/home/predragnikolic/.config/sublime-text/Packages'], 'stubPath': './typings', 'logLevel': 'Information', 'diagnosticSeverityOverrides': {'reportUnboundVariable': 'warning', 'reportUnusedImport': 'information', 'reportDuplicateImport ': 'warning', 'reportMissingParameterType': 'none', 'reportUnusedClass': 'information', 'reportUnusedFunction': 'information', 'reportUninitializedInstanceVariable': 'none', 'reportUnusedVariable': 'information', 'reportImplicitStringConcatenation': 'warning'}}, 'pythonPath': 'python', 'venvPath': ''}, 'pyright': {'disableLanguageServices': False, 'dev_environment': 'sublime_text_38', 'disableOrganizeImports': False}}}
:: <-- LSP-pyright client/registerCapability(0): {'registrations': [{'id': 'd9de6266-8b86-46c6-9a76-a2326d21767e', 'registerOptions': {}, 'method': 'workspace/didChangeWorkspaceFolders'}]}
:: >>> LSP-pyright 0: None
:: <-- LSP-pyright client/registerCapability(1): {'registrations': [{'id': '761d257e-4402-4976-88c7-a9f074cd969b', 'registerOptions': {'watchers': [{'globPattern': '**/pyrightconfig.json', 'kind': 7}, {'globPattern': '**', 'kind': 7}]}, 'method': 'workspace/didChangeWatchedFiles'}]}
:: >>> LSP-pyright 1: None
::  -> LSP-pyright textDocument/didOpen: {'textDocument': {'languageId': 'python', 'version': 0, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'text': '# Stubs for sublime (Python 3.5)\n#\n# NOTE: This dynamically typed stub was automatically generated by stubgen.\n\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Reversible, Sequence, Tuple, Union\n\n\nclass _LogWriter:\n    def flush(self) -> None:\n        ...\n\n    def write(self, s: str) -> None\n        ...\n\n\nHOVER_TEXT = ...  # type: int\nHOVER_GUTTER = ...  # type: int\nHOVER_MARGIN = ...  # type: int\nENCODED_POSITION = ...  # type: int\nTRANSIENT = ...  # type: int\nSEMI_TRANSIENT = ...  # type: int\nFORCE_GROUP = ...  # type: int\nADD_TO_SELECTION = ...  # type: int\nREPLACE_MRU = ...  # type: int\nCLEAR_TO_RIGHT = ...  # type: int\nIGNORECASE = ...  # type: int\nLITERAL = ...  # type: int\nMONOSPACE_FONT = ...  # type: int\nKEEP_OPEN_ON_FOCUS_LOST = ...  # type: int\nHTML = ...  # type: int\nCOOPERATE_WITH_AUTO_COMPLETE = ...  # type: int\nHIDE_ON_MOUSE_MOVE = ...  # type: int\nHIDE_ON_MOUSE_MOVE_AWAY = ...  # type: int\nKEEP_ON_SELECTION_MODIFIED = ...  # type: int\nDRAW_EMPTY = ...  # type: int\nHIDE_ON_MINIMAP = ...  # type: int\nDRAW_EMPTY_AS_OVERWRITE = ...  # type: int\nPERSISTENT = ...  # type: int\nDRAW_OUTLINED = ...  # type: int\nDRAW_NO_FILL = ...  # type: int\nDRAW_NO_OUTLINE = ...  # type: int\nDRAW_SOLID_UNDERLINE = ...  # type: int\nDRAW_STIPPLED_UNDERLINE = ...  # type: int\nDRAW_SQUIGGLY_UNDERLINE = ...  # type: int\nHIDDEN = ...  # type: int\nOP_EQUAL = ...  # type: int\nOP_NOT_EQUAL = ...  # type: int\nOP_REGEX_MATCH = ...  # type: int\nOP_NOT_REGEX_MATCH = ...  # type: int\nOP_REGEX_CONTAINS = ...  # type: int\nOP_NOT_REGEX_CONTAINS = ...  # type: int\nCLASS_WORD_START = ...  # type: int\nCLASS_WORD_END = ...  # type: int\nCLASS_PUNCTUATION_START = ...  # type: int\nCLASS_PUNCTUATION_END = ...  # type: int\nCLASS_SUB_WORD_START = ...  # type: int\nCLASS_SUB_WORD_END = ...  # type: int\nCLASS_LINE_START = ...  # type: int\nCLASS_LINE_END = ...  # type: int\nCLASS_EMPTY_LINE = ...  # type: int\nINHIBIT_WORD_COMPLETIONS = ...  # type: int\nINHIBIT_EXPLICIT_COMPLETIONS = ...  # type: int\nINHIBIT_REORDER = ...  # type: int\nDYNAMIC_COMPLETIONS = ...  # type: int\nCOMPLETION_FLAG_KEEP_PREFIX = ...  # type: int\nDIALOG_CANCEL = ...  # type: int\nDIALOG_YES = ...  # type: int\nDIALOG_NO = ...  # type: int\nUI_ELEMENT_SIDE_BAR = ...  # type: int\nUI_ELEMENT_MINIMAP = ...  # type: int\nUI_ELEMENT_TABS = ...  # type: int\nUI_ELEMENT_STATUS_BAR = ...  # type: int\nUI_ELEMENT_MENU = ...  # type: int\nUI_ELEMENT_OPEN_FILES = ...  # type: int\nLAYOUT_INLINE = ...  # type: int\nLAYOUT_BELOW = ...  # type: int\nLAYOUT_BLOCK = ...  # type: int\nKIND_ID_AMBIGUOUS = ...  # type: int\nKIND_ID_KEYWORD = ...  # type: int\nKIND_ID_TYPE = ...  # type: int\nKIND_ID_COLOR_DARK = ... # type: int\nKIND_ID_COLOR_LIGHT = ... # type: int\nKIND_ID_COLOR_BLUISH = ... # type: int\nKIND_ID_COLOR_CYANISH = ... # type: int\nKIND_ID_COLOR_GREENISH = ... # type: int\nKIND_ID_COLOR_ORANGISH = ... # type: int\nKIND_ID_COLOR_PINKISH = ... # type: int\nKIND_ID_COLOR_PURPLISH = ... # type: int\nKIND_ID_COLOR_REDISH = ... # type: int\nKIND_ID_COLOR_YELLOWISH = ... # type: int\nKIND_ID_FUNCTION = ...  # type: int\nKIND_ID_NAMESPACE = ...  # type: int\nKIND_ID_NAVIGATION = ...  # type: int\nKIND_ID_MARKUP = ...  # type: int\nKIND_ID_VARIABLE = ...  # type: int\nKIND_ID_SNIPPET = ...  # type: int\nKIND_AMBIGUOUS = ...  # type: Tuple[int, str, str]\nKIND_KEYWORD = ...  # type: Tuple[int, str, str]\nKIND_TYPE = ...  # type: Tuple[int, str, str]\nKIND_FUNCTION = ...  # type: Tuple[int, str, str]\nKIND_NAMESPACE = ...  # type: Tuple[int, str, str]\nKIND_NAVIGATION = ...  # type: Tuple[int, str, str]\nKIND_MARKUP = ...  # type: Tuple[int, str, str]\nKIND_VARIABLE = ...  # type: Tuple[int, str, str]\nKIND_SNIPPET = ...  # type: Tuple[int, str, str]\nCOMPLETION_FORMAT_TEXT = ...  # type: int\nCOMPLETION_FORMAT_SNIPPET = ...  # type: int\nWANT_EVENT = ...  # type: int\n\n\nclass Settings:\n    settings_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def get(self, key: str, default: Optional[Any] = ...) -> Optional[Any]:\n        ...\n\n    def has(self, key: str) -> bool:\n        ...\n\n    def set(self, key: str, value: Any) -> None:\n        ...\n\n    def erase(self, key: str) -> None:\n        ...\n\n    def add_on_change(self, tag: str, callback: Callable[[], None]) -> None:\n        ...\n\n    def clear_on_change(self, tag: str) -> None:\n        ...\n\n\ndef version() -> str:\n    ...\n\n\ndef platform() -> str:\n    ...\n\n\ndef arch() -> str:\n    ...\n\n\ndef channel() -> str:\n    ...\n\n\ndef executable_path() -> str:\n    ...\n\n\ndef executable_hash() -> str:\n    ...\n\n\ndef packages_path() -> str:\n    ...\n\n\ndef installed_packages_path() -> str:\n    ...\n\n\ndef cache_path() -> str:\n    ...\n\n\ndef status_message(msg: str) -> None:\n    ...\n\n\ndef error_message(msg: str) -> None:\n    ...\n\n\ndef message_dialog(msg: str) -> None:\n    ...\n\n\ndef ok_cancel_dialog(msg: str, ok_title: str = ...) -> bool:\n    ...\n\n\ndef yes_no_cancel_dialog(msg: str, yes_title: str = ..., no_title: str = ...) -> int:\n    ...\n\n\ndef run_command(cmd: str, args: Optional[Any] = ...) -> None:\n    ...\n\n\ndef get_clipboard(size_limit: int = ...) -> str:\n    ...\n\n\ndef set_clipboard(text: str) -> None:\n    ...\n\n\ndef log_commands(flag: bool) -> None:\n    ...\n\n\ndef log_input(flag: bool) -> None:\n    ...\n\n\ndef log_result_regex(flag: bool) -> None:\n    ...\n\n\ndef log_indexing(flag: bool) -> None:\n    ...\n\n\ndef log_build_systems(flag: bool) -> None:\n    ...\n\n\ndef score_selector(scope_name: str, selector: str) -> int:\n    ...\n\n\ndef load_resource(name: str) -> str:\n    ...\n\n\ndef load_binary_resource(name: str) -> bytes:\n    ...\n\n\ndef find_resources(pattern: str) -> Sequence[str]:\n    ...\n\n\ndef encode_value(val: Any, pretty: bool = ...) -> str:\n    ...\n\n\ndef decode_value(data: str) -> Any:\n    ...\n\n\ndef expand_variables(val: Any, variables: dict) -> Any:\n    ...\n\n\ndef load_settings(base_name: str) -> Settings:\n    ...\n\n\ndef save_settings(base_name: str) -> None:\n    ...\n\n\ndef set_timeout(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef set_timeout_async(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef active_window() -> \'Window\':\n    ...\n\n\ndef windows() -> \'Sequence[Window]\':\n    ...\n\n\ndef get_macro() -> Sequence[dict]:\n    ...\n\n\ndef syntax_from_path(syntax_path: str) -> Optional[Syntax]:\n    ...\n\n\ndef command_url(cmd: str, args: Optional[dict] = ...) -> str:\n    ...\n\n\nclass Syntax:\n    path = ...  # type: str\n    name = ...  # type: str\n    hidden = ...  # type: bool\n    scope = ...  # type: str\n\n    def __init__(self, path: str, name: str, hidden: bool, scope: str) -> None:\n        ...\n\n\nclass CompletionItem:\n    flags = ...  # type: int\n    details = ...  # type: str\n    annotation = ...  # type: str\n    kind = ...  # type: Tuple[int, str, str]\n\n    def __init__(\n            self,\n            trigger: str,\n            annotation: str = "",\n            completion: str = "",\n            completion_format: int = COMPLETION_FORMAT_TEXT,\n            kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n            details: str = "") -> None:\n        ...\n\n    @classmethod\n    def snippet_completion(\n            cls,\n            trigger: str,\n            snippet: str,\n            annotation: str = " ",\n            kind: Tuple[int, str, str] = KIND_SNIPPET,\n            details: str = "") -> \'CompletionItem\':\n        ...\n\n    @classmethod\n    def command_completion(cls,\n                           trigger: str,\n                           command: str,\n                           args: dict = {},\n                           annotation: str = "",\n                           kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n                           details: str = ""\n                           ) -> \'CompletionItem\':\n        ...\n\n\nclass CompletionList:\n    def set_completions(self, completions: List[CompletionItem], flags: int = 0) -> None:\n        ...\n\n\nclass Window:\n    window_id = ...  # type: int\n    settings_object = ...  # type: Settings\n    template_settings_object = ...  # type: Any\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    # def hwnd(self): ...\n    def active_sheet(self) -> \'Sheet\':\n        ...\n\n    def active_view(self) -> \'Optional[View]\':\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def new_file(self, flags: int = ..., syntax: str = ...) -> \'View\':\n        ...\n\n    def open_file(self, fname: str, flags: int = ..., group: int = ...) -> \'View\':\n        ...\n\n    def find_open_file(self, fname: str) -> \'Optional[View]\':\n        ...\n\n    def num_groups(self) -> int:\n        ...\n\n    def active_group(self) -> int:\n        ...\n\n    def focus_group(self, idx: int) -> None:\n        ...\n\n    def focus_sheet(self, sheet: \'Sheet\') -> None:\n        ...\n\n    def focus_view(self, view: \'View\') -> None:\n        ...\n\n    def get_sheet_index(self, sheet: \'Sheet\') -> Tuple[int, int]:\n        ...\n\n    def get_view_index(self, view: \'View\') -> Tuple[int, int]:\n        ...\n\n    def set_sheet_index(self, sheet: \'Sheet\', group: int, idx: int) -> None:\n        ...\n\n    def set_view_index(self, view: \'View\', group: int, idx: int) -> None:\n        ...\n\n    def sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views(self) -> \'List[View]\':\n        ...\n\n    def active_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def active_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    def sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views_in_group(self, group: int) -> \'List[View]\':\n        ...\n\n    def transient_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def transient_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    # def layout(self): ...\n    # def get_layout(self): ...\n    # def set_layout(self, layout): ...\n    def create_output_panel(self, name: str, unlisted: bool = ...) -> \'View\':\n        ...\n\n    def find_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def destroy_output_panel(self, name: str) -> None:\n        ...\n\n    def active_panel(self) -> Optional[str]:\n        ...\n\n    def panels(self) -> List[str]:\n        ...\n\n    def get_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def show_input_panel(self, caption: str, initial_text: str, on_done: Optional[Callable],\n                         on_change: Optional[Callable], on_cancel: Optional[Callable]) -> \'View\':\n        ...\n\n    def show_quick_panel(self,\n                         items: List[Any],\n                         on_select: Callable,\n                         flags: int = ...,\n                         selected_index: int = ...,\n                         on_highlight: Optional[Callable] = ...,\n                         placeholder: Optional[str] = ...) -> None:\n        ...\n\n    def is_sidebar_visible(self) -> bool:\n        ...\n\n    def set_sidebar_visible(self, flag: bool) -> None:\n        ...\n\n    def is_minimap_visible(self) -> bool:\n        ...\n\n    def set_minimap_visible(self, flag: bool) -> None:\n        ...\n\n    def is_status_bar_visible(self) -> bool:\n        ...\n\n    def set_status_bar_visible(self, flag: bool) -> None:\n        ...\n\n    def get_tabs_visible(self) -> bool:\n        ...\n\n    def set_tabs_visible(self, flag: bool) -> None:\n        ...\n\n    def is_menu_visible(self) -> bool:\n        ...\n\n    def set_menu_visible(self, flag: bool) -> None:\n        ...\n\n    def folders(self) -> List[str]:\n        ...\n\n    def project_file_name(self) -> str:\n        ...\n\n    def project_data(self) -> Optional[dict]:\n        ...\n\n    def set_project_data(self, v: Union[dict, None]) -> None:\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def template_settings(self): ...\n    def lookup_symbol_in_index(self, sym: str) -> List[str]:\n        ...\n\n    def lookup_symbol_in_open_files(self, sym: str) -> List[str]:\n        ...\n\n    def extract_variables(self) -> dict:\n        ...\n\n    def status_message(self, msg: str) -> None:\n        ...\n\n\nclass Edit:\n    edit_token = ...  # type: Any\n\n    def __init__(self, token: Any) -> None:\n        ...\n\n\nclass Region:\n    a = ...  # type: int\n    b = ...  # type: int\n    xpos = ...  # type: int\n\n    def __init__(self, a: int, b: Optional[int] = ..., xpos: int = ...) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n    def __lt__(self, rhs: object) -> bool:\n        ...\n\n    def empty(self) -> bool:\n        ...\n\n    def begin(self) -> int:\n        ...\n\n    def end(self) -> int:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    def contains(self, x: \'Union[Region, int]\') -> bool:\n        ...\n\n    def cover(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersection(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersects(self, rhs: \'Region\') -> bool:\n        ...\n\n    def to_tuple(self) -> Tuple[int, int]:\n        ...\n\n\nclass Selection(Reversible):\n    view_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __reversed__(self) -> Iterator[Region]:\n        ...\n\n    def __iter__(self) -> Iterator[Region]:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __getitem__(self, index: int) -> Region:\n        ...\n\n    def __delitem__(self, index: int) -> None:\n        ...\n\n    def __eq__(self, rhs: Any) -> bool:\n        ...\n\n    def __lt__(self, rhs: Any) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def clear(self) -> None:\n        ...\n\n    def add(self, x: Union[Region, int]) -> None:\n        ...\n\n    def add_all(self, regions: Iterator[Union[Region, int]]) -> None:\n        ...\n\n    def subtract(self, region: Region) -> None:\n        ...\n\n    def contains(self, region: Region) -> bool:\n        ...\n\n\nclass Sheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def group(self) -> int:\n        ...\n\n    def view(self) -> \'Optional[View]\':\n        ...\n\n    def is_semi_transient(self) -> bool:\n        ...\n\n    def is_transient(self) -> bool:\n        ...\n\n\nclass HtmlSheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def set_contents(self, contents: str) -> None:\n        ...\n\n\nclass ContextStackFrame:\n    context_name = ... # type: str\n    source_file = ... # type: str\n    source_location = ... # type: Tuple[int, int]\n\n\nclass View:\n    view_id = ...  # type: Any\n    selection = ...  # type: Any\n    settings_object = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def sheet(self) -> Sheet:\n        ...\n\n    def syntax(self) -> Any:\n        ...\n\n    def element(self) -> Optional[str]:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def buffer(self) -> "Optional[Buffer]":\n        ...\n\n    def buffer_id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def is_primary(self) -> bool:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def file_name(self) -> Optional[str]:\n        ...\n\n    def close(self) -> None:\n        ...\n\n    def retarget(self, new_fname: str) -> None:\n        ...\n\n    def name(self) -> str:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def is_loading(self) -> bool:\n        ...\n\n    def is_dirty(self) -> bool:\n        ...\n\n    def is_read_only(self) -> bool:\n        ...\n\n    def set_read_only(self, read_only: bool) -> None:\n        ...\n\n    def is_scratch(self) -> bool:\n        ...\n\n    def set_scratch(self, scratch: bool) -> None:\n        ...\n\n    def encoding(self) -> str:\n        ...\n\n    def set_encoding(self, encoding_name: str) -> None:\n        ...\n\n    def line_endings(self) -> str:\n        ...\n\n    def set_line_endings(self, line_ending_name: str) -> None:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    # def begin_edit(self, edit_token, cmd, args: Optional[Any] = ...) -> Edit: ...\n    # def end_edit(self, edit: Edit) -> None: ...\n    def is_in_edit(self) -> bool:\n        ...\n\n    def insert(self, edit: Edit, pt: int, text: str) -> None:\n        ...\n\n    def erase(self, edit: Edit, r: Region) -> None:\n        ...\n\n    def replace(self, edit: Edit, r: Region, text: str) -> None:\n        ...\n\n    def change_count(self) -> int:\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def sel(self) -> Selection:\n        ...\n\n    def substr(self, x: Union[Region, int]) -> str:\n        ...\n\n    def find(self, pattern: str, start_pt: int, flags: int = ...) -> Optional[Region]:\n        ...\n\n    def find_all(self, pattern: str, flags: int = ..., fmt: Optional[Any] = ...,\n                 extractions: Optional[Any] = ...) -> \'List[Region]\':\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def meta_info(self, key, pt: int): ...\n    def extract_scope(self, pt: int) -> Region:\n        ...\n\n    def scope_name(self, pt: int) -> str:\n        ...\n\n    def context_backtrace(self, pt: int) -> Union[List[ContextStackFrame], List[str]]:\n        ...\n\n    def match_selector(self, pt: int, selector: str) -> bool:\n        ...\n\n    def score_selector(self, pt: int, selector: str) -> int:\n        ...\n\n    def find_by_selector(self, selector: str) -> List[Region]:\n        ...\n\n    # def indented_region(self, pt: int): ...\n    # def indentation_level(self, pt: int): ...\n    def has_non_empty_selection_region(self) -> bool:\n        ...\n\n    def lines(self, r: Region) -> List[Region]:\n        ...\n\n    def split_by_newlines(self, r: Region) -> List[Region]:\n        ...\n\n    def line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def full_line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def word(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def classify(self, pt: int) -> int:\n        ...\n\n    def find_by_class(self, pt: int, forward: bool, classes: int, separators: str = ...) -> int:\n        ...\n\n    def expand_by_class(self, x: Union[Region, int], classes: int, separators: str = ...) -> Region:\n        ...\n\n    def rowcol(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf8(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf16(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def text_point(self, row: int, col: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf8(self, row: int, col_utf8: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf16(self, row: int, col_utf16: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def visible_region(self) -> Region:\n        ...\n\n    def show(self, x: Union[Selection, Region, int], show_surrounds: bool = ...) -> None:\n        ...\n\n    def show_at_center(self, x: Union[Selection, Region, int], animate: bool = True) -> None:\n        ...\n\n    def viewport_position(self) -> Tuple[int, int]:\n        ...\n\n    def set_viewport_position(self, xy: Tuple[int, int], animate: bool = ...) -> None:\n        ...\n\n    def viewport_extent(self) -> Tuple[int, int]:\n        ...\n\n    def layout_extent(self) -> Tuple[int, int]:\n        ...\n\n    def text_to_layout(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def layout_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def window_to_layout(self, xy: Tuple[int, int]) -> Tuple[int, int]:\n        ...\n\n    def window_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def line_height(self) -> float:\n        ...\n\n    def em_width(self) -> float:\n        ...\n\n    # def is_folded(self, sr) -> bool: ...\n    # def folded_regions(self): ...\n    def fold(self, x: Union[Region, List[Region]]) -> bool:\n        ...\n\n    def unfold(self, x: Union[Region, List[Region]]) -> List[Region]:\n        ...\n\n    def add_regions(self, key: str, regions: List[Region], scope: str = ..., icon: str = ..., flags: int = ...,\n                    annotations: List[str] = ..., annotation_color: str = ...,\n                    on_navigate: Callable[[str], None] = ..., on_close: Callable[[], None] = ...) -> None:\n        ...\n\n    def get_regions(self, key: str) -> List[Region]:\n        ...\n\n    def erase_regions(self, key: str) -> None:\n        ...\n\n    # def add_phantom(self, key: str, region: Region, content: str, layout, on_navigate: Optional[Any] = ...): ...\n    # def erase_phantoms(self, key: str) -> None: ...\n    # def erase_phantom_by_id(self, pid) -> None: ...\n    # def query_phantom(self, pid): ...\n    # def query_phantoms(self, pids): ...\n    def assign_syntax(self, syntax_file: str) -> None:\n        ...\n\n    def set_syntax_file(self, syntax_file: str) -> None:\n        ...\n\n    def symbols(self) -> List[Tuple[Region, str]]:\n        ...\n\n    # def get_symbols(self): ...\n    # def indexed_symbols(self): ...\n    def set_status(self, key: str, value: str) -> None:\n        ...\n\n    def get_status(self, key: str) -> str:\n        ...\n\n    def erase_status(self, key: str) -> None:\n        ...\n\n    # def extract_completions(self, prefix: str, tp: int = ...): ...\n    # def find_all_results(self): ...\n    # def find_all_results_with_text(self): ...\n    def command_history(self, delta: int, modifying_only: bool = ...) -> \'Tuple[str, dict, int]\':\n        ...\n\n    def overwrite_status(self) -> bool:\n        ...\n\n    def set_overwrite_status(self, value: bool) -> None:\n        ...\n\n    def show_popup_menu(self, items: List[str], on_select: \'Callable\', flags: int = ...) -> None:\n        ...\n\n    def show_popup(self,\n                   content: str,\n                   flags: int = ...,\n                   location: int = ...,\n                   max_width: int = ...,\n                   max_height: int = ...,\n                   on_navigate: Optional[Any] = ...,\n                   on_hide: Optional[Any] = ...) -> None:\n        ...\n\n    def update_popup(self, content: str) -> None:\n        ...\n\n    def is_popup_visible(self) -> bool:\n        ...\n\n    def hide_popup(self) -> None:\n        ...\n\n    def is_auto_complete_visible(self) -> bool:\n        ...\n\n    def change_id(self) -> Any:  # opaque handle object\n        ...\n\n    def transform_region_from(self, region: Region, change_id: Any) -> Region:\n        ...\n\n    def style_for_scope(self, scope: str) -> Dict[str, str]:\n        ...\n\n\nclass Buffer:\n    buffer_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def views(self) -> Optional[List[View]]:\n        ...\n\n    def primary_view(self) -> Optional[View]:\n        ...\n\n\nclass Phantom:\n    region = ...  # type: Region\n    content = ...  # type: Any\n    layout = ...  # type: Any\n    on_navigate = ...  # type: Any\n    id = ...  # type: Any\n\n    def __init__(self, region: Region, content: str, layout: int, on_navigate: Optional[Any] = ...) -> None:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n\nclass PhantomSet:\n    view = ...  # type: View\n    key = ...  # type: Any\n    phantoms = ...  # type: Any\n\n    def __init__(self, view: View, key: str = ...) -> None:\n        ...\n\n    def __del__(self) -> None:\n        ...\n\n    def update(self, new_phantoms: Sequence[Phantom]) -> None:\n        ...\n\n\nclass HistoricPosition:\n    pt = ...  # type: int\n    row = ...  # type: int\n    col = ...  # type: int\n    col_utf16 = ...  # type: int\n    col_utf8 = ...  # type: int\n\n\nclass TextChange:\n    a = ...  # type: HistoricPosition\n    b = ...  # type: HistoricPosition\n    str = ...  # type: str\n    len_utf8 = ...  # type: int\n    len_utf16 = ...  # type: int\n\n\nclass QuickPanelItem:\n    def __init__(\n        self,\n        trigger: str,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass ListInputItem:\n    def __init__(\n        self,\n        text: str,\n        value: Any,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass Html:\n    def __init__(\n        self,\n        text: str,\n    ) -> None:\n        ...\n'}}
:: <-- LSP-pyright workspace/configuration(2): {'items': [{'scopeUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'section': 'python'}]}
:: >>> LSP-pyright 2: [{'analysis': {'autoSearchPaths': True, 'diagnosticMode': 'openFilesOnly', 'autoImportCompletions': True, 'typeCheckingMode': 'basic', 'typeshedPaths': [], 'useLibraryCodeForTypes': True, 'extraPaths': ['/home/predragnikolic/.config/sublime-text/Packages/LSP/libs', '/home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/resources/typings/sublime_text', '/opt/sublime_text/Lib/python38', '/opt/sublime_text/Lib/python3', '/home/predragnikolic/.config/sublime-text/Lib/python38', '/opt/sublime_text/Packages', '/home/predragnikolic/.config/sublime-text/Packages/sublime_lib/st3', '/home/predragnikolic/.config/sublime-text/Packages/lsp_utils/st3', '/home/predragnikolic/.config/sublime-text/Packages/shellenv/all', '/home/predragnikolic/.config/sublime-text/Packages/coverage/st3_linux_x64', '/home/predragnikolic/.config/sublime-text/Packages/backrefs/st3', '/home/predragnikolic/.config/sublime-text/Packages/bracex/st3', '/home/predragnikolic/.config/sublime-text/Packages/pathlib/all', '/home/predragnikolic/.config/sublime-text/Packages/pyyaml/st3', '/home/predragnikolic/.config/sublime-text/Packages/typing/st3', '/home/predragnikolic/.config/sublime-text/Packages/jsonschema/all', '/home/predragnikolic/.config/sublime-text/Packages/mdpopups/st3', '/home/predragnikolic/.config/sublime-text/Packages/wcmatch/st3', '/home/predragnikolic/.config/sublime-text/Packages'], 'stubPath': './typings', 'logLevel': 'Information', 'diagnosticSeverityOverrides': {'reportUnboundVariable': 'warning', 'reportUnusedImport': 'information', 'reportDuplicateImport ': 'warning', 'reportMissingParameterType': 'none', 'reportUnusedClass': 'information', 'reportUnusedFunction': 'information', 'reportUninitializedInstanceVariable': 'none', 'reportUnusedVariable': 'information', 'reportImplicitStringConcatenation': 'warning'}}, 'pythonPath': 'python', 'venvPath': ''}]
:: <-- LSP-pyright workspace/configuration(3): {'items': [{'scopeUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'section': 'python.analysis'}]}
:: >>> LSP-pyright 3: [{'autoSearchPaths': True, 'diagnosticMode': 'openFilesOnly', 'autoImportCompletions': True, 'typeCheckingMode': 'basic', 'typeshedPaths': [], 'useLibraryCodeForTypes': True, 'extraPaths': ['/home/predragnikolic/.config/sublime-text/Packages/LSP/libs', '/home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/resources/typings/sublime_text', '/opt/sublime_text/Lib/python38', '/opt/sublime_text/Lib/python3', '/home/predragnikolic/.config/sublime-text/Lib/python38', '/opt/sublime_text/Packages', '/home/predragnikolic/.config/sublime-text/Packages/sublime_lib/st3', '/home/predragnikolic/.config/sublime-text/Packages/lsp_utils/st3', '/home/predragnikolic/.config/sublime-text/Packages/shellenv/all', '/home/predragnikolic/.config/sublime-text/Packages/coverage/st3_linux_x64', '/home/predragnikolic/.config/sublime-text/Packages/backrefs/st3', '/home/predragnikolic/.config/sublime-text/Packages/bracex/st3', '/home/predragnikolic/.config/sublime-text/Packages/pathlib/all', '/home/predragnikolic/.config/sublime-text/Packages/pyyaml/st3', '/home/predragnikolic/.config/sublime-text/Packages/typing/st3', '/home/predragnikolic/.config/sublime-text/Packages/jsonschema/all', '/home/predragnikolic/.config/sublime-text/Packages/mdpopups/st3', '/home/predragnikolic/.config/sublime-text/Packages/wcmatch/st3', '/home/predragnikolic/.config/sublime-text/Packages'], 'stubPath': './typings', 'logLevel': 'Information', 'diagnosticSeverityOverrides': {'reportUnboundVariable': 'warning', 'reportUnusedImport': 'information', 'reportDuplicateImport ': 'warning', 'reportMissingParameterType': 'none', 'reportUnusedClass': 'information', 'reportUnusedFunction': 'information', 'reportUninitializedInstanceVariable': 'none', 'reportUnusedVariable': 'information', 'reportImplicitStringConcatenation': 'warning'}}]
:: <-- LSP-pyright workspace/configuration(4): {'items': [{'scopeUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'section': 'pyright'}]}
:: >>> LSP-pyright 4: [{'disableLanguageServices': False, 'dev_environment': 'sublime_text_38', 'disableOrganizeImports': False}]
LSP-pyright: Loading configuration file at /home/predragnikolic/.config/sublime-text/Packages/LSP/pyrightconfig.json
LSP-pyright: Assuming Python version 3.10
LSP-pyright: Assuming Python platform Linux
LSP-pyright: No include entries specified; assuming /home/predragnikolic/.config/sublime-text/Packages/LSP
LSP-pyright: Auto-excluding **/node_modules
LSP-pyright: Auto-excluding **/__pycache__
LSP-pyright: Auto-excluding **/.*
LSP-pyright: The stubPath has been specified in both the config file and the client settings. The value in the config file (/home/predragnikolic/.config/sublime-text/Packages/LSP/stubs) will take precedence
LSP-pyright: Searching for source files
LSP-pyright: Found 87 source files
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Loading configuration file at /home/predragnikolic/.config/sublime-text/Packages/LSP/pyrightconfig.json'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Assuming Python version 3.10'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Assuming Python platform Linux'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'No include entries specified; assuming /home/predragnikolic/.config/sublime-text/Packages/LSP'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Auto-excluding **/node_modules'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Auto-excluding **/__pycache__'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Auto-excluding **/.*'}
:: <-  LSP-pyright window/logMessage: {'type': 2, 'message': 'The stubPath has been specified in both the config file and the client settings. The value in the config file (/home/predragnikolic/.config/sublime-text/Packages/LSP/stubs) will take precedence'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Searching for source files'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Found 87 source files'}
:: <-- LSP-pyright client/registerCapability(5): {'registrations': [{'id': '09df1f8a-8f91-4e5e-8612-3a6220146de5', 'registerOptions': {'watchers': [{'globPattern': '**/pyrightconfig.json', 'kind': 7}, {'globPattern': '**', 'kind': 7}]}, 'method': 'workspace/didChangeWatchedFiles'}]}
:: >>> LSP-pyright 5: None
:: <-- LSP-pyright client/unregisterCapability(6): {'unregisterations': [{'id': '761d257e-4402-4976-88c7-a9f074cd969b', 'method': 'workspace/didChangeWatchedFiles'}]}
:: >>> LSP-pyright 6: None
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 1, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10'}]}
:: <-  LSP-pyright textDocument/publishDiagnostics: {'version': 0, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'diagnostics': [{'range': {'start': {'line': 11, 'character': 35}, 'end': {'line': 12, 'character': 0}}, 'source': 'Pyright', 'message': 'Expected ":"', 'severity': 1}]}
:: --> LSP-pyright textDocument/codeAction(2): {'range': {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0}}, 'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}, 'context': {'triggerKind': 2, 'diagnostics': []}}
:: <<< LSP-pyright 2: []
::  -> diagnostic-ls textDocument/didSave: {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}}
::  -> LSP-pyright textDocument/didSave: {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 2, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'type': 2, 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}]}

Here are the logs when:

  • the diagnotics panel is open
  • I open a file that has no diagnostics
  • and I press save:
:: --> diagnostic-ls initialize(1): {'initializationOptions': {'linters': {'cspell': {'debounce': 100, 'formatLines': 1, 'formatPattern': ['.*?:(\\d+):(\\d+)\\s*-\\s*(.*)', {'message': 3, 'column': 2, 'line': 1}], 'sourceName': 'cspell', 'args': ['%filepath'], 'command': 'cspell'}}, 'formatters': {}, 'filetypes': {'python': 'flake8'}}, 'rootPath': '/home/predragnikolic/.config/sublime-text/Packages/LSP', 'rootUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'capabilities': {'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'textDocument': {'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'signatureHelp': {'dynamicRegistration': True, 'contextSupport': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext'], 'activeParameterSupport': True}}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'documentHighlight': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'documentSymbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [4, 13, 1, 19, 14, 17, 7, 9, 16, 11, 23, 3, 15, 22, 8, 2, 6, 26, 25, 24, 18, 12, 21, 20, 10, 5]}, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'inlayHint': {'dynamicRegistration': True, 'resolveSupport': {'properties': ['textEdits', 'label.command']}}, 'completion': {'dynamicRegistration': True, 'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'insertReplaceSupport': True, 'labelDetailsSupport': True, 'tagSupport': {'valueSet': [1]}, 'snippetSupport': True}, 'completionItemKind': {'valueSet': [6, 17, 12, 11, 10, 4, 15, 8, 22, 18, 14, 20, 16, 5, 9, 2, 19, 23, 1, 25, 21, 3, 24, 13, 7]}, 'insertTextMode': 2}, 'publishDiagnostics': {'versionSupport': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'relatedInformation': True, 'codeDescriptionSupport': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'formatting': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'didSave': True, 'willSaveWaitUntil': True, 'willSave': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'documentLink': {'dynamicRegistration': True, 'tooltipSupport': True}, 'codeAction': {'dynamicRegistration': True, 'isPreferredSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'disabledSupport': True, 'resolveSupport': {'properties': ['edit']}, 'dataSupport': True}, 'selectionRange': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'semanticTokens': {'dynamicRegistration': True, 'overlappingTokenSupport': False, 'augmentsSyntaxTokens': True, 'multilineTokenSupport': True, 'tokenTypes': ['variable', 'comment', 'type', 'modifier', 'decorator', 'property', 'struct', 'interface', 'number', 'namespace', 'macro', 'keyword', 'regexp', 'enumMember', 'method', 'typeParameter', 'event', 'string', 'function', 'parameter', 'operator', 'enum', 'class'], 'requests': {'range': True, 'full': {'delta': True}}, 'formats': ['relative'], 'tokenModifiers': ['readonly', 'definition', 'abstract', 'deprecated', 'modification', 'static', 'async', 'documentation', 'declaration', 'defaultLibrary']}}, 'workspace': {'didChangeConfiguration': {'dynamicRegistration': True}, 'configuration': True, 'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [4, 13, 1, 19, 14, 17, 7, 9, 16, 11, 23, 3, 15, 22, 8, 2, 6, 26, 25, 24, 18, 12, 21, 20, 10, 5]}, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True, 'semanticTokens': {'refreshSupport': True}, 'didChangeWatchedFiles': {'dynamicRegistration': True}, 'inlayHint': {'refreshSupport': True}, 'applyEdit': True, 'executeCommand': {}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'codeLens': {'refreshSupport': True}}, 'window': {'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}, 'workDoneProgress': True}}, 'processId': 49134, 'workspaceFolders': [{'name': 'LSP', 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP'}], 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.18.0'}}
:: <<< diagnostic-ls 1: {'capabilities': {'textDocumentSync': {'didClose': {}, 'save': {}, 'didOpen': {}, 'change': {'syncKind': 2}}, 'documentFormattingProvider': True}}
::  -> diagnostic-ls initialized: {}
::  -> diagnostic-ls textDocument/didOpen: {'textDocument': {'text': '# Stubs for sublime (Python 3.5)\n#\n# NOTE: This dynamically typed stub was automatically generated by stubgen.\n\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Reversible, Sequence, Tuple, Union\n\n\nclass _LogWriter:\n    def flush(self) -> None:\n        ...\n\n    def write(self, s: str) -> None:\n        ...\n\n\nHOVER_TEXT = ...  # type: int\nHOVER_GUTTER = ...  # type: int\nHOVER_MARGIN = ...  # type: int\nENCODED_POSITION = ...  # type: int\nTRANSIENT = ...  # type: int\nSEMI_TRANSIENT = ...  # type: int\nFORCE_GROUP = ...  # type: int\nADD_TO_SELECTION = ...  # type: int\nREPLACE_MRU = ...  # type: int\nCLEAR_TO_RIGHT = ...  # type: int\nIGNORECASE = ...  # type: int\nLITERAL = ...  # type: int\nMONOSPACE_FONT = ...  # type: int\nKEEP_OPEN_ON_FOCUS_LOST = ...  # type: int\nHTML = ...  # type: int\nCOOPERATE_WITH_AUTO_COMPLETE = ...  # type: int\nHIDE_ON_MOUSE_MOVE = ...  # type: int\nHIDE_ON_MOUSE_MOVE_AWAY = ...  # type: int\nKEEP_ON_SELECTION_MODIFIED = ...  # type: int\nDRAW_EMPTY = ...  # type: int\nHIDE_ON_MINIMAP = ...  # type: int\nDRAW_EMPTY_AS_OVERWRITE = ...  # type: int\nPERSISTENT = ...  # type: int\nDRAW_OUTLINED = ...  # type: int\nDRAW_NO_FILL = ...  # type: int\nDRAW_NO_OUTLINE = ...  # type: int\nDRAW_SOLID_UNDERLINE = ...  # type: int\nDRAW_STIPPLED_UNDERLINE = ...  # type: int\nDRAW_SQUIGGLY_UNDERLINE = ...  # type: int\nHIDDEN = ...  # type: int\nOP_EQUAL = ...  # type: int\nOP_NOT_EQUAL = ...  # type: int\nOP_REGEX_MATCH = ...  # type: int\nOP_NOT_REGEX_MATCH = ...  # type: int\nOP_REGEX_CONTAINS = ...  # type: int\nOP_NOT_REGEX_CONTAINS = ...  # type: int\nCLASS_WORD_START = ...  # type: int\nCLASS_WORD_END = ...  # type: int\nCLASS_PUNCTUATION_START = ...  # type: int\nCLASS_PUNCTUATION_END = ...  # type: int\nCLASS_SUB_WORD_START = ...  # type: int\nCLASS_SUB_WORD_END = ...  # type: int\nCLASS_LINE_START = ...  # type: int\nCLASS_LINE_END = ...  # type: int\nCLASS_EMPTY_LINE = ...  # type: int\nINHIBIT_WORD_COMPLETIONS = ...  # type: int\nINHIBIT_EXPLICIT_COMPLETIONS = ...  # type: int\nINHIBIT_REORDER = ...  # type: int\nDYNAMIC_COMPLETIONS = ...  # type: int\nCOMPLETION_FLAG_KEEP_PREFIX = ...  # type: int\nDIALOG_CANCEL = ...  # type: int\nDIALOG_YES = ...  # type: int\nDIALOG_NO = ...  # type: int\nUI_ELEMENT_SIDE_BAR = ...  # type: int\nUI_ELEMENT_MINIMAP = ...  # type: int\nUI_ELEMENT_TABS = ...  # type: int\nUI_ELEMENT_STATUS_BAR = ...  # type: int\nUI_ELEMENT_MENU = ...  # type: int\nUI_ELEMENT_OPEN_FILES = ...  # type: int\nLAYOUT_INLINE = ...  # type: int\nLAYOUT_BELOW = ...  # type: int\nLAYOUT_BLOCK = ...  # type: int\nKIND_ID_AMBIGUOUS = ...  # type: int\nKIND_ID_KEYWORD = ...  # type: int\nKIND_ID_TYPE = ...  # type: int\nKIND_ID_COLOR_DARK = ... # type: int\nKIND_ID_COLOR_LIGHT = ... # type: int\nKIND_ID_COLOR_BLUISH = ... # type: int\nKIND_ID_COLOR_CYANISH = ... # type: int\nKIND_ID_COLOR_GREENISH = ... # type: int\nKIND_ID_COLOR_ORANGISH = ... # type: int\nKIND_ID_COLOR_PINKISH = ... # type: int\nKIND_ID_COLOR_PURPLISH = ... # type: int\nKIND_ID_COLOR_REDISH = ... # type: int\nKIND_ID_COLOR_YELLOWISH = ... # type: int\nKIND_ID_FUNCTION = ...  # type: int\nKIND_ID_NAMESPACE = ...  # type: int\nKIND_ID_NAVIGATION = ...  # type: int\nKIND_ID_MARKUP = ...  # type: int\nKIND_ID_VARIABLE = ...  # type: int\nKIND_ID_SNIPPET = ...  # type: int\nKIND_AMBIGUOUS = ...  # type: Tuple[int, str, str]\nKIND_KEYWORD = ...  # type: Tuple[int, str, str]\nKIND_TYPE = ...  # type: Tuple[int, str, str]\nKIND_FUNCTION = ...  # type: Tuple[int, str, str]\nKIND_NAMESPACE = ...  # type: Tuple[int, str, str]\nKIND_NAVIGATION = ...  # type: Tuple[int, str, str]\nKIND_MARKUP = ...  # type: Tuple[int, str, str]\nKIND_VARIABLE = ...  # type: Tuple[int, str, str]\nKIND_SNIPPET = ...  # type: Tuple[int, str, str]\nCOMPLETION_FORMAT_TEXT = ...  # type: int\nCOMPLETION_FORMAT_SNIPPET = ...  # type: int\nWANT_EVENT = ...  # type: int\n\n\nclass Settings:\n    settings_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def get(self, key: str, default: Optional[Any] = ...) -> Optional[Any]:\n        ...\n\n    def has(self, key: str) -> bool:\n        ...\n\n    def set(self, key: str, value: Any) -> None:\n        ...\n\n    def erase(self, key: str) -> None:\n        ...\n\n    def add_on_change(self, tag: str, callback: Callable[[], None]) -> None:\n        ...\n\n    def clear_on_change(self, tag: str) -> None:\n        ...\n\n\ndef version() -> str:\n    ...\n\n\ndef platform() -> str:\n    ...\n\n\ndef arch() -> str:\n    ...\n\n\ndef channel() -> str:\n    ...\n\n\ndef executable_path() -> str:\n    ...\n\n\ndef executable_hash() -> str:\n    ...\n\n\ndef packages_path() -> str:\n    ...\n\n\ndef installed_packages_path() -> str:\n    ...\n\n\ndef cache_path() -> str:\n    ...\n\n\ndef status_message(msg: str) -> None:\n    ...\n\n\ndef error_message(msg: str) -> None:\n    ...\n\n\ndef message_dialog(msg: str) -> None:\n    ...\n\n\ndef ok_cancel_dialog(msg: str, ok_title: str = ...) -> bool:\n    ...\n\n\ndef yes_no_cancel_dialog(msg: str, yes_title: str = ..., no_title: str = ...) -> int:\n    ...\n\n\ndef run_command(cmd: str, args: Optional[Any] = ...) -> None:\n    ...\n\n\ndef get_clipboard(size_limit: int = ...) -> str:\n    ...\n\n\ndef set_clipboard(text: str) -> None:\n    ...\n\n\ndef log_commands(flag: bool) -> None:\n    ...\n\n\ndef log_input(flag: bool) -> None:\n    ...\n\n\ndef log_result_regex(flag: bool) -> None:\n    ...\n\n\ndef log_indexing(flag: bool) -> None:\n    ...\n\n\ndef log_build_systems(flag: bool) -> None:\n    ...\n\n\ndef score_selector(scope_name: str, selector: str) -> int:\n    ...\n\n\ndef load_resource(name: str) -> str:\n    ...\n\n\ndef load_binary_resource(name: str) -> bytes:\n    ...\n\n\ndef find_resources(pattern: str) -> Sequence[str]:\n    ...\n\n\ndef encode_value(val: Any, pretty: bool = ...) -> str:\n    ...\n\n\ndef decode_value(data: str) -> Any:\n    ...\n\n\ndef expand_variables(val: Any, variables: dict) -> Any:\n    ...\n\n\ndef load_settings(base_name: str) -> Settings:\n    ...\n\n\ndef save_settings(base_name: str) -> None:\n    ...\n\n\ndef set_timeout(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef set_timeout_async(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef active_window() -> \'Window\':\n    ...\n\n\ndef windows() -> \'Sequence[Window]\':\n    ...\n\n\ndef get_macro() -> Sequence[dict]:\n    ...\n\n\ndef syntax_from_path(syntax_path: str) -> Optional[Syntax]:\n    ...\n\n\ndef command_url(cmd: str, args: Optional[dict] = ...) -> str:\n    ...\n\n\nclass Syntax:\n    path = ...  # type: str\n    name = ...  # type: str\n    hidden = ...  # type: bool\n    scope = ...  # type: str\n\n    def __init__(self, path: str, name: str, hidden: bool, scope: str) -> None:\n        ...\n\n\nclass CompletionItem:\n    flags = ...  # type: int\n    details = ...  # type: str\n    annotation = ...  # type: str\n    kind = ...  # type: Tuple[int, str, str]\n\n    def __init__(\n            self,\n            trigger: str,\n            annotation: str = "",\n            completion: str = "",\n            completion_format: int = COMPLETION_FORMAT_TEXT,\n            kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n            details: str = "") -> None:\n        ...\n\n    @classmethod\n    def snippet_completion(\n            cls,\n            trigger: str,\n            snippet: str,\n            annotation: str = " ",\n            kind: Tuple[int, str, str] = KIND_SNIPPET,\n            details: str = "") -> \'CompletionItem\':\n        ...\n\n    @classmethod\n    def command_completion(cls,\n                           trigger: str,\n                           command: str,\n                           args: dict = {},\n                           annotation: str = "",\n                           kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n                           details: str = ""\n                           ) -> \'CompletionItem\':\n        ...\n\n\nclass CompletionList:\n    def set_completions(self, completions: List[CompletionItem], flags: int = 0) -> None:\n        ...\n\n\nclass Window:\n    window_id = ...  # type: int\n    settings_object = ...  # type: Settings\n    template_settings_object = ...  # type: Any\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    # def hwnd(self): ...\n    def active_sheet(self) -> \'Sheet\':\n        ...\n\n    def active_view(self) -> \'Optional[View]\':\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def new_file(self, flags: int = ..., syntax: str = ...) -> \'View\':\n        ...\n\n    def open_file(self, fname: str, flags: int = ..., group: int = ...) -> \'View\':\n        ...\n\n    def find_open_file(self, fname: str) -> \'Optional[View]\':\n        ...\n\n    def num_groups(self) -> int:\n        ...\n\n    def active_group(self) -> int:\n        ...\n\n    def focus_group(self, idx: int) -> None:\n        ...\n\n    def focus_sheet(self, sheet: \'Sheet\') -> None:\n        ...\n\n    def focus_view(self, view: \'View\') -> None:\n        ...\n\n    def get_sheet_index(self, sheet: \'Sheet\') -> Tuple[int, int]:\n        ...\n\n    def get_view_index(self, view: \'View\') -> Tuple[int, int]:\n        ...\n\n    def set_sheet_index(self, sheet: \'Sheet\', group: int, idx: int) -> None:\n        ...\n\n    def set_view_index(self, view: \'View\', group: int, idx: int) -> None:\n        ...\n\n    def sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views(self) -> \'List[View]\':\n        ...\n\n    def active_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def active_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    def sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views_in_group(self, group: int) -> \'List[View]\':\n        ...\n\n    def transient_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def transient_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    # def layout(self): ...\n    # def get_layout(self): ...\n    # def set_layout(self, layout): ...\n    def create_output_panel(self, name: str, unlisted: bool = ...) -> \'View\':\n        ...\n\n    def find_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def destroy_output_panel(self, name: str) -> None:\n        ...\n\n    def active_panel(self) -> Optional[str]:\n        ...\n\n    def panels(self) -> List[str]:\n        ...\n\n    def get_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def show_input_panel(self, caption: str, initial_text: str, on_done: Optional[Callable],\n                         on_change: Optional[Callable], on_cancel: Optional[Callable]) -> \'View\':\n        ...\n\n    def show_quick_panel(self,\n                         items: List[Any],\n                         on_select: Callable,\n                         flags: int = ...,\n                         selected_index: int = ...,\n                         on_highlight: Optional[Callable] = ...,\n                         placeholder: Optional[str] = ...) -> None:\n        ...\n\n    def is_sidebar_visible(self) -> bool:\n        ...\n\n    def set_sidebar_visible(self, flag: bool) -> None:\n        ...\n\n    def is_minimap_visible(self) -> bool:\n        ...\n\n    def set_minimap_visible(self, flag: bool) -> None:\n        ...\n\n    def is_status_bar_visible(self) -> bool:\n        ...\n\n    def set_status_bar_visible(self, flag: bool) -> None:\n        ...\n\n    def get_tabs_visible(self) -> bool:\n        ...\n\n    def set_tabs_visible(self, flag: bool) -> None:\n        ...\n\n    def is_menu_visible(self) -> bool:\n        ...\n\n    def set_menu_visible(self, flag: bool) -> None:\n        ...\n\n    def folders(self) -> List[str]:\n        ...\n\n    def project_file_name(self) -> str:\n        ...\n\n    def project_data(self) -> Optional[dict]:\n        ...\n\n    def set_project_data(self, v: Union[dict, None]) -> None:\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def template_settings(self): ...\n    def lookup_symbol_in_index(self, sym: str) -> List[str]:\n        ...\n\n    def lookup_symbol_in_open_files(self, sym: str) -> List[str]:\n        ...\n\n    def extract_variables(self) -> dict:\n        ...\n\n    def status_message(self, msg: str) -> None:\n        ...\n\n\nclass Edit:\n    edit_token = ...  # type: Any\n\n    def __init__(self, token: Any) -> None:\n        ...\n\n\nclass Region:\n    a = ...  # type: int\n    b = ...  # type: int\n    xpos = ...  # type: int\n\n    def __init__(self, a: int, b: Optional[int] = ..., xpos: int = ...) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n    def __lt__(self, rhs: object) -> bool:\n        ...\n\n    def empty(self) -> bool:\n        ...\n\n    def begin(self) -> int:\n        ...\n\n    def end(self) -> int:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    def contains(self, x: \'Union[Region, int]\') -> bool:\n        ...\n\n    def cover(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersection(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersects(self, rhs: \'Region\') -> bool:\n        ...\n\n    def to_tuple(self) -> Tuple[int, int]:\n        ...\n\n\nclass Selection(Reversible):\n    view_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __reversed__(self) -> Iterator[Region]:\n        ...\n\n    def __iter__(self) -> Iterator[Region]:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __getitem__(self, index: int) -> Region:\n        ...\n\n    def __delitem__(self, index: int) -> None:\n        ...\n\n    def __eq__(self, rhs: Any) -> bool:\n        ...\n\n    def __lt__(self, rhs: Any) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def clear(self) -> None:\n        ...\n\n    def add(self, x: Union[Region, int]) -> None:\n        ...\n\n    def add_all(self, regions: Iterator[Union[Region, int]]) -> None:\n        ...\n\n    def subtract(self, region: Region) -> None:\n        ...\n\n    def contains(self, region: Region) -> bool:\n        ...\n\n\nclass Sheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def group(self) -> int:\n        ...\n\n    def view(self) -> \'Optional[View]\':\n        ...\n\n    def is_semi_transient(self) -> bool:\n        ...\n\n    def is_transient(self) -> bool:\n        ...\n\n\nclass HtmlSheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def set_contents(self, contents: str) -> None:\n        ...\n\n\nclass ContextStackFrame:\n    context_name = ... # type: str\n    source_file = ... # type: str\n    source_location = ... # type: Tuple[int, int]\n\n\nclass View:\n    view_id = ...  # type: Any\n    selection = ...  # type: Any\n    settings_object = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def sheet(self) -> Sheet:\n        ...\n\n    def syntax(self) -> Any:\n        ...\n\n    def element(self) -> Optional[str]:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def buffer(self) -> "Optional[Buffer]":\n        ...\n\n    def buffer_id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def is_primary(self) -> bool:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def file_name(self) -> Optional[str]:\n        ...\n\n    def close(self) -> None:\n        ...\n\n    def retarget(self, new_fname: str) -> None:\n        ...\n\n    def name(self) -> str:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def is_loading(self) -> bool:\n        ...\n\n    def is_dirty(self) -> bool:\n        ...\n\n    def is_read_only(self) -> bool:\n        ...\n\n    def set_read_only(self, read_only: bool) -> None:\n        ...\n\n    def is_scratch(self) -> bool:\n        ...\n\n    def set_scratch(self, scratch: bool) -> None:\n        ...\n\n    def encoding(self) -> str:\n        ...\n\n    def set_encoding(self, encoding_name: str) -> None:\n        ...\n\n    def line_endings(self) -> str:\n        ...\n\n    def set_line_endings(self, line_ending_name: str) -> None:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    # def begin_edit(self, edit_token, cmd, args: Optional[Any] = ...) -> Edit: ...\n    # def end_edit(self, edit: Edit) -> None: ...\n    def is_in_edit(self) -> bool:\n        ...\n\n    def insert(self, edit: Edit, pt: int, text: str) -> None:\n        ...\n\n    def erase(self, edit: Edit, r: Region) -> None:\n        ...\n\n    def replace(self, edit: Edit, r: Region, text: str) -> None:\n        ...\n\n    def change_count(self) -> int:\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def sel(self) -> Selection:\n        ...\n\n    def substr(self, x: Union[Region, int]) -> str:\n        ...\n\n    def find(self, pattern: str, start_pt: int, flags: int = ...) -> Optional[Region]:\n        ...\n\n    def find_all(self, pattern: str, flags: int = ..., fmt: Optional[Any] = ...,\n                 extractions: Optional[Any] = ...) -> \'List[Region]\':\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def meta_info(self, key, pt: int): ...\n    def extract_scope(self, pt: int) -> Region:\n        ...\n\n    def scope_name(self, pt: int) -> str:\n        ...\n\n    def context_backtrace(self, pt: int) -> Union[List[ContextStackFrame], List[str]]:\n        ...\n\n    def match_selector(self, pt: int, selector: str) -> bool:\n        ...\n\n    def score_selector(self, pt: int, selector: str) -> int:\n        ...\n\n    def find_by_selector(self, selector: str) -> List[Region]:\n        ...\n\n    # def indented_region(self, pt: int): ...\n    # def indentation_level(self, pt: int): ...\n    def has_non_empty_selection_region(self) -> bool:\n        ...\n\n    def lines(self, r: Region) -> List[Region]:\n        ...\n\n    def split_by_newlines(self, r: Region) -> List[Region]:\n        ...\n\n    def line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def full_line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def word(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def classify(self, pt: int) -> int:\n        ...\n\n    def find_by_class(self, pt: int, forward: bool, classes: int, separators: str = ...) -> int:\n        ...\n\n    def expand_by_class(self, x: Union[Region, int], classes: int, separators: str = ...) -> Region:\n        ...\n\n    def rowcol(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf8(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf16(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def text_point(self, row: int, col: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf8(self, row: int, col_utf8: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf16(self, row: int, col_utf16: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def visible_region(self) -> Region:\n        ...\n\n    def show(self, x: Union[Selection, Region, int], show_surrounds: bool = ...) -> None:\n        ...\n\n    def show_at_center(self, x: Union[Selection, Region, int], animate: bool = True) -> None:\n        ...\n\n    def viewport_position(self) -> Tuple[int, int]:\n        ...\n\n    def set_viewport_position(self, xy: Tuple[int, int], animate: bool = ...) -> None:\n        ...\n\n    def viewport_extent(self) -> Tuple[int, int]:\n        ...\n\n    def layout_extent(self) -> Tuple[int, int]:\n        ...\n\n    def text_to_layout(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def layout_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def window_to_layout(self, xy: Tuple[int, int]) -> Tuple[int, int]:\n        ...\n\n    def window_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def line_height(self) -> float:\n        ...\n\n    def em_width(self) -> float:\n        ...\n\n    # def is_folded(self, sr) -> bool: ...\n    # def folded_regions(self): ...\n    def fold(self, x: Union[Region, List[Region]]) -> bool:\n        ...\n\n    def unfold(self, x: Union[Region, List[Region]]) -> List[Region]:\n        ...\n\n    def add_regions(self, key: str, regions: List[Region], scope: str = ..., icon: str = ..., flags: int = ...,\n                    annotations: List[str] = ..., annotation_color: str = ...,\n                    on_navigate: Callable[[str], None] = ..., on_close: Callable[[], None] = ...) -> None:\n        ...\n\n    def get_regions(self, key: str) -> List[Region]:\n        ...\n\n    def erase_regions(self, key: str) -> None:\n        ...\n\n    # def add_phantom(self, key: str, region: Region, content: str, layout, on_navigate: Optional[Any] = ...): ...\n    # def erase_phantoms(self, key: str) -> None: ...\n    # def erase_phantom_by_id(self, pid) -> None: ...\n    # def query_phantom(self, pid): ...\n    # def query_phantoms(self, pids): ...\n    def assign_syntax(self, syntax_file: str) -> None:\n        ...\n\n    def set_syntax_file(self, syntax_file: str) -> None:\n        ...\n\n    def symbols(self) -> List[Tuple[Region, str]]:\n        ...\n\n    # def get_symbols(self): ...\n    # def indexed_symbols(self): ...\n    def set_status(self, key: str, value: str) -> None:\n        ...\n\n    def get_status(self, key: str) -> str:\n        ...\n\n    def erase_status(self, key: str) -> None:\n        ...\n\n    # def extract_completions(self, prefix: str, tp: int = ...): ...\n    # def find_all_results(self): ...\n    # def find_all_results_with_text(self): ...\n    def command_history(self, delta: int, modifying_only: bool = ...) -> \'Tuple[str, dict, int]\':\n        ...\n\n    def overwrite_status(self) -> bool:\n        ...\n\n    def set_overwrite_status(self, value: bool) -> None:\n        ...\n\n    def show_popup_menu(self, items: List[str], on_select: \'Callable\', flags: int = ...) -> None:\n        ...\n\n    def show_popup(self,\n                   content: str,\n                   flags: int = ...,\n                   location: int = ...,\n                   max_width: int = ...,\n                   max_height: int = ...,\n                   on_navigate: Optional[Any] = ...,\n                   on_hide: Optional[Any] = ...) -> None:\n        ...\n\n    def update_popup(self, content: str) -> None:\n        ...\n\n    def is_popup_visible(self) -> bool:\n        ...\n\n    def hide_popup(self) -> None:\n        ...\n\n    def is_auto_complete_visible(self) -> bool:\n        ...\n\n    def change_id(self) -> Any:  # opaque handle object\n        ...\n\n    def transform_region_from(self, region: Region, change_id: Any) -> Region:\n        ...\n\n    def style_for_scope(self, scope: str) -> Dict[str, str]:\n        ...\n\n\nclass Buffer:\n    buffer_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def views(self) -> Optional[List[View]]:\n        ...\n\n    def primary_view(self) -> Optional[View]:\n        ...\n\n\nclass Phantom:\n    region = ...  # type: Region\n    content = ...  # type: Any\n    layout = ...  # type: Any\n    on_navigate = ...  # type: Any\n    id = ...  # type: Any\n\n    def __init__(self, region: Region, content: str, layout: int, on_navigate: Optional[Any] = ...) -> None:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n\nclass PhantomSet:\n    view = ...  # type: View\n    key = ...  # type: Any\n    phantoms = ...  # type: Any\n\n    def __init__(self, view: View, key: str = ...) -> None:\n        ...\n\n    def __del__(self) -> None:\n        ...\n\n    def update(self, new_phantoms: Sequence[Phantom]) -> None:\n        ...\n\n\nclass HistoricPosition:\n    pt = ...  # type: int\n    row = ...  # type: int\n    col = ...  # type: int\n    col_utf16 = ...  # type: int\n    col_utf8 = ...  # type: int\n\n\nclass TextChange:\n    a = ...  # type: HistoricPosition\n    b = ...  # type: HistoricPosition\n    str = ...  # type: str\n    len_utf8 = ...  # type: int\n    len_utf16 = ...  # type: int\n\n\nclass QuickPanelItem:\n    def __init__(\n        self,\n        trigger: str,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass ListInputItem:\n    def __init__(\n        self,\n        text: str,\n        value: Any,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass Html:\n    def __init__(\n        self,\n        text: str,\n    ) -> None:\n        ...\n', 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'version': 0, 'languageId': 'python'}}
:: --> LSP-pyright initialize(1): {'initializationOptions': {}, 'rootPath': '/home/predragnikolic/.config/sublime-text/Packages/LSP', 'rootUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP', 'capabilities': {'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'textDocument': {'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'signatureHelp': {'dynamicRegistration': True, 'contextSupport': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext'], 'activeParameterSupport': True}}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'documentHighlight': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'documentSymbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [4, 13, 1, 19, 14, 17, 7, 9, 16, 11, 23, 3, 15, 22, 8, 2, 6, 26, 25, 24, 18, 12, 21, 20, 10, 5]}, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'inlayHint': {'dynamicRegistration': True, 'resolveSupport': {'properties': ['textEdits', 'label.command']}}, 'completion': {'dynamicRegistration': True, 'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'insertReplaceSupport': True, 'labelDetailsSupport': True, 'tagSupport': {'valueSet': [1]}, 'snippetSupport': True}, 'completionItemKind': {'valueSet': [6, 17, 12, 11, 10, 4, 15, 8, 22, 18, 14, 20, 16, 5, 9, 2, 19, 23, 1, 25, 21, 3, 24, 13, 7]}, 'insertTextMode': 2}, 'publishDiagnostics': {'versionSupport': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'relatedInformation': True, 'codeDescriptionSupport': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'formatting': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'didSave': True, 'willSaveWaitUntil': True, 'willSave': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'documentLink': {'dynamicRegistration': True, 'tooltipSupport': True}, 'codeAction': {'dynamicRegistration': True, 'isPreferredSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'disabledSupport': True, 'resolveSupport': {'properties': ['edit']}, 'dataSupport': True}, 'selectionRange': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'semanticTokens': {'dynamicRegistration': True, 'overlappingTokenSupport': False, 'augmentsSyntaxTokens': True, 'multilineTokenSupport': True, 'tokenTypes': ['variable', 'comment', 'type', 'modifier', 'decorator', 'property', 'struct', 'interface', 'number', 'namespace', 'macro', 'keyword', 'regexp', 'enumMember', 'method', 'typeParameter', 'event', 'string', 'function', 'parameter', 'operator', 'enum', 'class'], 'requests': {'range': True, 'full': {'delta': True}}, 'formats': ['relative'], 'tokenModifiers': ['readonly', 'definition', 'abstract', 'deprecated', 'modification', 'static', 'async', 'documentation', 'declaration', 'defaultLibrary']}}, 'workspace': {'didChangeConfiguration': {'dynamicRegistration': True}, 'configuration': True, 'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [4, 13, 1, 19, 14, 17, 7, 9, 16, 11, 23, 3, 15, 22, 8, 2, 6, 26, 25, 24, 18, 12, 21, 20, 10, 5]}, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True, 'semanticTokens': {'refreshSupport': True}, 'didChangeWatchedFiles': {'dynamicRegistration': True}, 'inlayHint': {'refreshSupport': True}, 'applyEdit': True, 'executeCommand': {}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'codeLens': {'refreshSupport': True}}, 'window': {'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}, 'workDoneProgress': True}}, 'processId': 49134, 'workspaceFolders': [{'name': 'LSP', 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP'}], 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.18.0'}}
LSP-pyright: Pyright language server 1.1.272 starting
LSP-pyright: Server root directory: /home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/14.17.6/language-server/node_modules/pyright/dist/
LSP-pyright: Starting service instance "LSP"
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Pyright language server 1.1.272 starting'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Server root directory: /home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/14.17.6/language-server/node_modules/pyright/dist/'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Starting service instance "LSP"'}
:: <<< LSP-pyright 1: {'capabilities': {'workspaceSymbolProvider': {'workDoneProgress': True}, 'textDocumentSync': {'didClose': {}, 'save': {}, 'didOpen': {}, 'change': {'syncKind': 2}}, 'definitionProvider': {'workDoneProgress': True}, 'renameProvider': {'prepareProvider': True, 'workDoneProgress': True}, 'codeActionProvider': {'codeActionKinds': ['quickfix', 'source.organizeImports'], 'workDoneProgress': True}, 'typeDefinitionProvider': {'workDoneProgress': True}, 'executeCommandProvider': {'workDoneProgress': True, 'commands': []}, 'referencesProvider': {'workDoneProgress': True}, 'documentHighlightProvider': {'workDoneProgress': True}, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', ')'], 'workDoneProgress': True}, 'documentSymbolProvider': {'workDoneProgress': True}, 'callHierarchyProvider': True, 'declarationProvider': {'workDoneProgress': True}, 'completionProvider': {'completionItem': {'labelDetailsSupport': True}, 'workDoneProgress': True, 'triggerCharacters': ['.', '['], 'resolveProvider': True}, 'hoverProvider': {'workDoneProgress': True}}}
::  -> LSP-pyright initialized: {}
::  -> LSP-pyright workspace/didChangeConfiguration: {'settings': {'pyright': {'disableOrganizeImports': False, 'dev_environment': 'sublime_text_38', 'disableLanguageServices': False}, 'python': {'venvPath': '', 'pythonPath': 'python', 'analysis': {'logLevel': 'Information', 'typeshedPaths': [], 'stubPath': './typings', 'extraPaths': ['/home/predragnikolic/.config/sublime-text/Packages/LSP/libs', '/home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/resources/typings/sublime_text', '/opt/sublime_text/Lib/python38', '/opt/sublime_text/Lib/python3', '/home/predragnikolic/.config/sublime-text/Lib/python38', '/opt/sublime_text/Packages', '/home/predragnikolic/.config/sublime-text/Packages/sublime_lib/st3', '/home/predragnikolic/.config/sublime-text/Packages/lsp_utils/st3', '/home/predragnikolic/.config/sublime-text/Packages/shellenv/all', '/home/predragnikolic/.config/sublime-text/Packages/coverage/st3_linux_x64', '/home/predragnikolic/.config/sublime-text/Packages/backrefs/st3', '/home/predragnikolic/.config/sublime-text/Packages/bracex/st3', '/home/predragnikolic/.config/sublime-text/Packages/pathlib/all', '/home/predragnikolic/.config/sublime-text/Packages/pyyaml/st3', '/home/predragnikolic/.config/sublime-text/Packages/typing/st3', '/home/predragnikolic/.config/sublime-text/Packages/jsonschema/all', '/home/predragnikolic/.config/sublime-text/Packages/mdpopups/st3', '/home/predragnikolic/.config/sublime-text/Packages/wcmatch/st3', '/home/predragnikolic/.config/sublime-text/Packages'], 'useLibraryCodeForTypes': True, 'diagnosticMode': 'openFilesOnly', 'autoSearchPaths': True, 'typeCheckingMode': 'basic', 'autoImportCompletions': True, 'diagnosticSeverityOverrides': {'reportUnusedVariable': 'information', 'reportImplicitStringConcatenation': 'warning', 'reportUnusedFunction': 'information', 'reportUnboundVariable': 'warning', 'reportMissingParameterType': 'none', 'reportDuplicateImport ': 'warning', 'reportUnusedImport': 'information', 'reportUninitializedInstanceVariable': 'none', 'reportUnusedClass': 'information'}}}}}
:: <-- LSP-pyright client/registerCapability(0): {'registrations': [{'method': 'workspace/didChangeWorkspaceFolders', 'registerOptions': {}, 'id': 'f9fad868-978b-4f40-be28-5f6dd605f11f'}]}
:: >>> LSP-pyright 0: None
:: <-- LSP-pyright client/registerCapability(1): {'registrations': [{'method': 'workspace/didChangeWatchedFiles', 'registerOptions': {'watchers': [{'kind': 7, 'globPattern': '**/pyrightconfig.json'}, {'kind': 7, 'globPattern': '**'}]}, 'id': '9cd172d5-e3f7-4efc-883f-ef921d457f44'}]}
:: >>> LSP-pyright 1: None
::  -> LSP-pyright textDocument/didOpen: {'textDocument': {'text': '# Stubs for sublime (Python 3.5)\n#\n# NOTE: This dynamically typed stub was automatically generated by stubgen.\n\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Reversible, Sequence, Tuple, Union\n\n\nclass _LogWriter:\n    def flush(self) -> None:\n        ...\n\n    def write(self, s: str) -> None:\n        ...\n\n\nHOVER_TEXT = ...  # type: int\nHOVER_GUTTER = ...  # type: int\nHOVER_MARGIN = ...  # type: int\nENCODED_POSITION = ...  # type: int\nTRANSIENT = ...  # type: int\nSEMI_TRANSIENT = ...  # type: int\nFORCE_GROUP = ...  # type: int\nADD_TO_SELECTION = ...  # type: int\nREPLACE_MRU = ...  # type: int\nCLEAR_TO_RIGHT = ...  # type: int\nIGNORECASE = ...  # type: int\nLITERAL = ...  # type: int\nMONOSPACE_FONT = ...  # type: int\nKEEP_OPEN_ON_FOCUS_LOST = ...  # type: int\nHTML = ...  # type: int\nCOOPERATE_WITH_AUTO_COMPLETE = ...  # type: int\nHIDE_ON_MOUSE_MOVE = ...  # type: int\nHIDE_ON_MOUSE_MOVE_AWAY = ...  # type: int\nKEEP_ON_SELECTION_MODIFIED = ...  # type: int\nDRAW_EMPTY = ...  # type: int\nHIDE_ON_MINIMAP = ...  # type: int\nDRAW_EMPTY_AS_OVERWRITE = ...  # type: int\nPERSISTENT = ...  # type: int\nDRAW_OUTLINED = ...  # type: int\nDRAW_NO_FILL = ...  # type: int\nDRAW_NO_OUTLINE = ...  # type: int\nDRAW_SOLID_UNDERLINE = ...  # type: int\nDRAW_STIPPLED_UNDERLINE = ...  # type: int\nDRAW_SQUIGGLY_UNDERLINE = ...  # type: int\nHIDDEN = ...  # type: int\nOP_EQUAL = ...  # type: int\nOP_NOT_EQUAL = ...  # type: int\nOP_REGEX_MATCH = ...  # type: int\nOP_NOT_REGEX_MATCH = ...  # type: int\nOP_REGEX_CONTAINS = ...  # type: int\nOP_NOT_REGEX_CONTAINS = ...  # type: int\nCLASS_WORD_START = ...  # type: int\nCLASS_WORD_END = ...  # type: int\nCLASS_PUNCTUATION_START = ...  # type: int\nCLASS_PUNCTUATION_END = ...  # type: int\nCLASS_SUB_WORD_START = ...  # type: int\nCLASS_SUB_WORD_END = ...  # type: int\nCLASS_LINE_START = ...  # type: int\nCLASS_LINE_END = ...  # type: int\nCLASS_EMPTY_LINE = ...  # type: int\nINHIBIT_WORD_COMPLETIONS = ...  # type: int\nINHIBIT_EXPLICIT_COMPLETIONS = ...  # type: int\nINHIBIT_REORDER = ...  # type: int\nDYNAMIC_COMPLETIONS = ...  # type: int\nCOMPLETION_FLAG_KEEP_PREFIX = ...  # type: int\nDIALOG_CANCEL = ...  # type: int\nDIALOG_YES = ...  # type: int\nDIALOG_NO = ...  # type: int\nUI_ELEMENT_SIDE_BAR = ...  # type: int\nUI_ELEMENT_MINIMAP = ...  # type: int\nUI_ELEMENT_TABS = ...  # type: int\nUI_ELEMENT_STATUS_BAR = ...  # type: int\nUI_ELEMENT_MENU = ...  # type: int\nUI_ELEMENT_OPEN_FILES = ...  # type: int\nLAYOUT_INLINE = ...  # type: int\nLAYOUT_BELOW = ...  # type: int\nLAYOUT_BLOCK = ...  # type: int\nKIND_ID_AMBIGUOUS = ...  # type: int\nKIND_ID_KEYWORD = ...  # type: int\nKIND_ID_TYPE = ...  # type: int\nKIND_ID_COLOR_DARK = ... # type: int\nKIND_ID_COLOR_LIGHT = ... # type: int\nKIND_ID_COLOR_BLUISH = ... # type: int\nKIND_ID_COLOR_CYANISH = ... # type: int\nKIND_ID_COLOR_GREENISH = ... # type: int\nKIND_ID_COLOR_ORANGISH = ... # type: int\nKIND_ID_COLOR_PINKISH = ... # type: int\nKIND_ID_COLOR_PURPLISH = ... # type: int\nKIND_ID_COLOR_REDISH = ... # type: int\nKIND_ID_COLOR_YELLOWISH = ... # type: int\nKIND_ID_FUNCTION = ...  # type: int\nKIND_ID_NAMESPACE = ...  # type: int\nKIND_ID_NAVIGATION = ...  # type: int\nKIND_ID_MARKUP = ...  # type: int\nKIND_ID_VARIABLE = ...  # type: int\nKIND_ID_SNIPPET = ...  # type: int\nKIND_AMBIGUOUS = ...  # type: Tuple[int, str, str]\nKIND_KEYWORD = ...  # type: Tuple[int, str, str]\nKIND_TYPE = ...  # type: Tuple[int, str, str]\nKIND_FUNCTION = ...  # type: Tuple[int, str, str]\nKIND_NAMESPACE = ...  # type: Tuple[int, str, str]\nKIND_NAVIGATION = ...  # type: Tuple[int, str, str]\nKIND_MARKUP = ...  # type: Tuple[int, str, str]\nKIND_VARIABLE = ...  # type: Tuple[int, str, str]\nKIND_SNIPPET = ...  # type: Tuple[int, str, str]\nCOMPLETION_FORMAT_TEXT = ...  # type: int\nCOMPLETION_FORMAT_SNIPPET = ...  # type: int\nWANT_EVENT = ...  # type: int\n\n\nclass Settings:\n    settings_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def get(self, key: str, default: Optional[Any] = ...) -> Optional[Any]:\n        ...\n\n    def has(self, key: str) -> bool:\n        ...\n\n    def set(self, key: str, value: Any) -> None:\n        ...\n\n    def erase(self, key: str) -> None:\n        ...\n\n    def add_on_change(self, tag: str, callback: Callable[[], None]) -> None:\n        ...\n\n    def clear_on_change(self, tag: str) -> None:\n        ...\n\n\ndef version() -> str:\n    ...\n\n\ndef platform() -> str:\n    ...\n\n\ndef arch() -> str:\n    ...\n\n\ndef channel() -> str:\n    ...\n\n\ndef executable_path() -> str:\n    ...\n\n\ndef executable_hash() -> str:\n    ...\n\n\ndef packages_path() -> str:\n    ...\n\n\ndef installed_packages_path() -> str:\n    ...\n\n\ndef cache_path() -> str:\n    ...\n\n\ndef status_message(msg: str) -> None:\n    ...\n\n\ndef error_message(msg: str) -> None:\n    ...\n\n\ndef message_dialog(msg: str) -> None:\n    ...\n\n\ndef ok_cancel_dialog(msg: str, ok_title: str = ...) -> bool:\n    ...\n\n\ndef yes_no_cancel_dialog(msg: str, yes_title: str = ..., no_title: str = ...) -> int:\n    ...\n\n\ndef run_command(cmd: str, args: Optional[Any] = ...) -> None:\n    ...\n\n\ndef get_clipboard(size_limit: int = ...) -> str:\n    ...\n\n\ndef set_clipboard(text: str) -> None:\n    ...\n\n\ndef log_commands(flag: bool) -> None:\n    ...\n\n\ndef log_input(flag: bool) -> None:\n    ...\n\n\ndef log_result_regex(flag: bool) -> None:\n    ...\n\n\ndef log_indexing(flag: bool) -> None:\n    ...\n\n\ndef log_build_systems(flag: bool) -> None:\n    ...\n\n\ndef score_selector(scope_name: str, selector: str) -> int:\n    ...\n\n\ndef load_resource(name: str) -> str:\n    ...\n\n\ndef load_binary_resource(name: str) -> bytes:\n    ...\n\n\ndef find_resources(pattern: str) -> Sequence[str]:\n    ...\n\n\ndef encode_value(val: Any, pretty: bool = ...) -> str:\n    ...\n\n\ndef decode_value(data: str) -> Any:\n    ...\n\n\ndef expand_variables(val: Any, variables: dict) -> Any:\n    ...\n\n\ndef load_settings(base_name: str) -> Settings:\n    ...\n\n\ndef save_settings(base_name: str) -> None:\n    ...\n\n\ndef set_timeout(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef set_timeout_async(f: Callable[[], Any], timeout_ms: int = ...) -> None:\n    ...\n\n\ndef active_window() -> \'Window\':\n    ...\n\n\ndef windows() -> \'Sequence[Window]\':\n    ...\n\n\ndef get_macro() -> Sequence[dict]:\n    ...\n\n\ndef syntax_from_path(syntax_path: str) -> Optional[Syntax]:\n    ...\n\n\ndef command_url(cmd: str, args: Optional[dict] = ...) -> str:\n    ...\n\n\nclass Syntax:\n    path = ...  # type: str\n    name = ...  # type: str\n    hidden = ...  # type: bool\n    scope = ...  # type: str\n\n    def __init__(self, path: str, name: str, hidden: bool, scope: str) -> None:\n        ...\n\n\nclass CompletionItem:\n    flags = ...  # type: int\n    details = ...  # type: str\n    annotation = ...  # type: str\n    kind = ...  # type: Tuple[int, str, str]\n\n    def __init__(\n            self,\n            trigger: str,\n            annotation: str = "",\n            completion: str = "",\n            completion_format: int = COMPLETION_FORMAT_TEXT,\n            kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n            details: str = "") -> None:\n        ...\n\n    @classmethod\n    def snippet_completion(\n            cls,\n            trigger: str,\n            snippet: str,\n            annotation: str = " ",\n            kind: Tuple[int, str, str] = KIND_SNIPPET,\n            details: str = "") -> \'CompletionItem\':\n        ...\n\n    @classmethod\n    def command_completion(cls,\n                           trigger: str,\n                           command: str,\n                           args: dict = {},\n                           annotation: str = "",\n                           kind: Tuple[int, str, str] = KIND_AMBIGUOUS,\n                           details: str = ""\n                           ) -> \'CompletionItem\':\n        ...\n\n\nclass CompletionList:\n    def set_completions(self, completions: List[CompletionItem], flags: int = 0) -> None:\n        ...\n\n\nclass Window:\n    window_id = ...  # type: int\n    settings_object = ...  # type: Settings\n    template_settings_object = ...  # type: Any\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    # def hwnd(self): ...\n    def active_sheet(self) -> \'Sheet\':\n        ...\n\n    def active_view(self) -> \'Optional[View]\':\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def new_file(self, flags: int = ..., syntax: str = ...) -> \'View\':\n        ...\n\n    def open_file(self, fname: str, flags: int = ..., group: int = ...) -> \'View\':\n        ...\n\n    def find_open_file(self, fname: str) -> \'Optional[View]\':\n        ...\n\n    def num_groups(self) -> int:\n        ...\n\n    def active_group(self) -> int:\n        ...\n\n    def focus_group(self, idx: int) -> None:\n        ...\n\n    def focus_sheet(self, sheet: \'Sheet\') -> None:\n        ...\n\n    def focus_view(self, view: \'View\') -> None:\n        ...\n\n    def get_sheet_index(self, sheet: \'Sheet\') -> Tuple[int, int]:\n        ...\n\n    def get_view_index(self, view: \'View\') -> Tuple[int, int]:\n        ...\n\n    def set_sheet_index(self, sheet: \'Sheet\', group: int, idx: int) -> None:\n        ...\n\n    def set_view_index(self, view: \'View\', group: int, idx: int) -> None:\n        ...\n\n    def sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets(self) -> \'List[Sheet]\':\n        ...\n\n    def selected_sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views(self) -> \'List[View]\':\n        ...\n\n    def active_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def active_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    def sheets_in_group(self, group: int) -> \'List[Sheet]\':\n        ...\n\n    def views_in_group(self, group: int) -> \'List[View]\':\n        ...\n\n    def transient_sheet_in_group(self, group: int) -> \'Sheet\':\n        ...\n\n    def transient_view_in_group(self, group: int) -> \'View\':\n        ...\n\n    # def layout(self): ...\n    # def get_layout(self): ...\n    # def set_layout(self, layout): ...\n    def create_output_panel(self, name: str, unlisted: bool = ...) -> \'View\':\n        ...\n\n    def find_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def destroy_output_panel(self, name: str) -> None:\n        ...\n\n    def active_panel(self) -> Optional[str]:\n        ...\n\n    def panels(self) -> List[str]:\n        ...\n\n    def get_output_panel(self, name: str) -> \'Optional[View]\':\n        ...\n\n    def show_input_panel(self, caption: str, initial_text: str, on_done: Optional[Callable],\n                         on_change: Optional[Callable], on_cancel: Optional[Callable]) -> \'View\':\n        ...\n\n    def show_quick_panel(self,\n                         items: List[Any],\n                         on_select: Callable,\n                         flags: int = ...,\n                         selected_index: int = ...,\n                         on_highlight: Optional[Callable] = ...,\n                         placeholder: Optional[str] = ...) -> None:\n        ...\n\n    def is_sidebar_visible(self) -> bool:\n        ...\n\n    def set_sidebar_visible(self, flag: bool) -> None:\n        ...\n\n    def is_minimap_visible(self) -> bool:\n        ...\n\n    def set_minimap_visible(self, flag: bool) -> None:\n        ...\n\n    def is_status_bar_visible(self) -> bool:\n        ...\n\n    def set_status_bar_visible(self, flag: bool) -> None:\n        ...\n\n    def get_tabs_visible(self) -> bool:\n        ...\n\n    def set_tabs_visible(self, flag: bool) -> None:\n        ...\n\n    def is_menu_visible(self) -> bool:\n        ...\n\n    def set_menu_visible(self, flag: bool) -> None:\n        ...\n\n    def folders(self) -> List[str]:\n        ...\n\n    def project_file_name(self) -> str:\n        ...\n\n    def project_data(self) -> Optional[dict]:\n        ...\n\n    def set_project_data(self, v: Union[dict, None]) -> None:\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def template_settings(self): ...\n    def lookup_symbol_in_index(self, sym: str) -> List[str]:\n        ...\n\n    def lookup_symbol_in_open_files(self, sym: str) -> List[str]:\n        ...\n\n    def extract_variables(self) -> dict:\n        ...\n\n    def status_message(self, msg: str) -> None:\n        ...\n\n\nclass Edit:\n    edit_token = ...  # type: Any\n\n    def __init__(self, token: Any) -> None:\n        ...\n\n\nclass Region:\n    a = ...  # type: int\n    b = ...  # type: int\n    xpos = ...  # type: int\n\n    def __init__(self, a: int, b: Optional[int] = ..., xpos: int = ...) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n    def __lt__(self, rhs: object) -> bool:\n        ...\n\n    def empty(self) -> bool:\n        ...\n\n    def begin(self) -> int:\n        ...\n\n    def end(self) -> int:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    def contains(self, x: \'Union[Region, int]\') -> bool:\n        ...\n\n    def cover(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersection(self, rhs: \'Region\') -> \'Region\':\n        ...\n\n    def intersects(self, rhs: \'Region\') -> bool:\n        ...\n\n    def to_tuple(self) -> Tuple[int, int]:\n        ...\n\n\nclass Selection(Reversible):\n    view_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __reversed__(self) -> Iterator[Region]:\n        ...\n\n    def __iter__(self) -> Iterator[Region]:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __getitem__(self, index: int) -> Region:\n        ...\n\n    def __delitem__(self, index: int) -> None:\n        ...\n\n    def __eq__(self, rhs: Any) -> bool:\n        ...\n\n    def __lt__(self, rhs: Any) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def clear(self) -> None:\n        ...\n\n    def add(self, x: Union[Region, int]) -> None:\n        ...\n\n    def add_all(self, regions: Iterator[Union[Region, int]]) -> None:\n        ...\n\n    def subtract(self, region: Region) -> None:\n        ...\n\n    def contains(self, region: Region) -> bool:\n        ...\n\n\nclass Sheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def group(self) -> int:\n        ...\n\n    def view(self) -> \'Optional[View]\':\n        ...\n\n    def is_semi_transient(self) -> bool:\n        ...\n\n    def is_transient(self) -> bool:\n        ...\n\n\nclass HtmlSheet:\n    sheet_id = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def set_contents(self, contents: str) -> None:\n        ...\n\n\nclass ContextStackFrame:\n    context_name = ... # type: str\n    source_file = ... # type: str\n    source_location = ... # type: Tuple[int, int]\n\n\nclass View:\n    view_id = ...  # type: Any\n    selection = ...  # type: Any\n    settings_object = ...  # type: Any\n\n    def __init__(self, id: Any) -> None:\n        ...\n\n    def __len__(self) -> int:\n        ...\n\n    def __eq__(self, other: object) -> bool:\n        ...\n\n    def __bool__(self) -> bool:\n        ...\n\n    def sheet(self) -> Sheet:\n        ...\n\n    def syntax(self) -> Any:\n        ...\n\n    def element(self) -> Optional[str]:\n        ...\n\n    def id(self) -> int:\n        ...\n\n    def buffer(self) -> "Optional[Buffer]":\n        ...\n\n    def buffer_id(self) -> int:\n        ...\n\n    def is_valid(self) -> bool:\n        ...\n\n    def is_primary(self) -> bool:\n        ...\n\n    def window(self) -> Optional[Window]:\n        ...\n\n    def file_name(self) -> Optional[str]:\n        ...\n\n    def close(self) -> None:\n        ...\n\n    def retarget(self, new_fname: str) -> None:\n        ...\n\n    def name(self) -> str:\n        ...\n\n    def set_name(self, name: str) -> None:\n        ...\n\n    def is_loading(self) -> bool:\n        ...\n\n    def is_dirty(self) -> bool:\n        ...\n\n    def is_read_only(self) -> bool:\n        ...\n\n    def set_read_only(self, read_only: bool) -> None:\n        ...\n\n    def is_scratch(self) -> bool:\n        ...\n\n    def set_scratch(self, scratch: bool) -> None:\n        ...\n\n    def encoding(self) -> str:\n        ...\n\n    def set_encoding(self, encoding_name: str) -> None:\n        ...\n\n    def line_endings(self) -> str:\n        ...\n\n    def set_line_endings(self, line_ending_name: str) -> None:\n        ...\n\n    def size(self) -> int:\n        ...\n\n    # def begin_edit(self, edit_token, cmd, args: Optional[Any] = ...) -> Edit: ...\n    # def end_edit(self, edit: Edit) -> None: ...\n    def is_in_edit(self) -> bool:\n        ...\n\n    def insert(self, edit: Edit, pt: int, text: str) -> None:\n        ...\n\n    def erase(self, edit: Edit, r: Region) -> None:\n        ...\n\n    def replace(self, edit: Edit, r: Region, text: str) -> None:\n        ...\n\n    def change_count(self) -> int:\n        ...\n\n    def run_command(self, cmd: str, args: Optional[Any] = ...) -> None:\n        ...\n\n    def sel(self) -> Selection:\n        ...\n\n    def substr(self, x: Union[Region, int]) -> str:\n        ...\n\n    def find(self, pattern: str, start_pt: int, flags: int = ...) -> Optional[Region]:\n        ...\n\n    def find_all(self, pattern: str, flags: int = ..., fmt: Optional[Any] = ...,\n                 extractions: Optional[Any] = ...) -> \'List[Region]\':\n        ...\n\n    def settings(self) -> Settings:\n        ...\n\n    # def meta_info(self, key, pt: int): ...\n    def extract_scope(self, pt: int) -> Region:\n        ...\n\n    def scope_name(self, pt: int) -> str:\n        ...\n\n    def context_backtrace(self, pt: int) -> Union[List[ContextStackFrame], List[str]]:\n        ...\n\n    def match_selector(self, pt: int, selector: str) -> bool:\n        ...\n\n    def score_selector(self, pt: int, selector: str) -> int:\n        ...\n\n    def find_by_selector(self, selector: str) -> List[Region]:\n        ...\n\n    # def indented_region(self, pt: int): ...\n    # def indentation_level(self, pt: int): ...\n    def has_non_empty_selection_region(self) -> bool:\n        ...\n\n    def lines(self, r: Region) -> List[Region]:\n        ...\n\n    def split_by_newlines(self, r: Region) -> List[Region]:\n        ...\n\n    def line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def full_line(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def word(self, x: Union[Region, int]) -> Region:\n        ...\n\n    def classify(self, pt: int) -> int:\n        ...\n\n    def find_by_class(self, pt: int, forward: bool, classes: int, separators: str = ...) -> int:\n        ...\n\n    def expand_by_class(self, x: Union[Region, int], classes: int, separators: str = ...) -> Region:\n        ...\n\n    def rowcol(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf8(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def rowcol_utf16(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def text_point(self, row: int, col: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf8(self, row: int, col_utf8: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def text_point_utf16(self, row: int, col_utf16: int, *, clamp_column: bool = False) -> int:\n        ...\n\n    def visible_region(self) -> Region:\n        ...\n\n    def show(self, x: Union[Selection, Region, int], show_surrounds: bool = ...) -> None:\n        ...\n\n    def show_at_center(self, x: Union[Selection, Region, int], animate: bool = True) -> None:\n        ...\n\n    def viewport_position(self) -> Tuple[int, int]:\n        ...\n\n    def set_viewport_position(self, xy: Tuple[int, int], animate: bool = ...) -> None:\n        ...\n\n    def viewport_extent(self) -> Tuple[int, int]:\n        ...\n\n    def layout_extent(self) -> Tuple[int, int]:\n        ...\n\n    def text_to_layout(self, tp: int) -> Tuple[int, int]:\n        ...\n\n    def layout_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def window_to_layout(self, xy: Tuple[int, int]) -> Tuple[int, int]:\n        ...\n\n    def window_to_text(self, xy: Tuple[int, int]) -> int:\n        ...\n\n    def line_height(self) -> float:\n        ...\n\n    def em_width(self) -> float:\n        ...\n\n    # def is_folded(self, sr) -> bool: ...\n    # def folded_regions(self): ...\n    def fold(self, x: Union[Region, List[Region]]) -> bool:\n        ...\n\n    def unfold(self, x: Union[Region, List[Region]]) -> List[Region]:\n        ...\n\n    def add_regions(self, key: str, regions: List[Region], scope: str = ..., icon: str = ..., flags: int = ...,\n                    annotations: List[str] = ..., annotation_color: str = ...,\n                    on_navigate: Callable[[str], None] = ..., on_close: Callable[[], None] = ...) -> None:\n        ...\n\n    def get_regions(self, key: str) -> List[Region]:\n        ...\n\n    def erase_regions(self, key: str) -> None:\n        ...\n\n    # def add_phantom(self, key: str, region: Region, content: str, layout, on_navigate: Optional[Any] = ...): ...\n    # def erase_phantoms(self, key: str) -> None: ...\n    # def erase_phantom_by_id(self, pid) -> None: ...\n    # def query_phantom(self, pid): ...\n    # def query_phantoms(self, pids): ...\n    def assign_syntax(self, syntax_file: str) -> None:\n        ...\n\n    def set_syntax_file(self, syntax_file: str) -> None:\n        ...\n\n    def symbols(self) -> List[Tuple[Region, str]]:\n        ...\n\n    # def get_symbols(self): ...\n    # def indexed_symbols(self): ...\n    def set_status(self, key: str, value: str) -> None:\n        ...\n\n    def get_status(self, key: str) -> str:\n        ...\n\n    def erase_status(self, key: str) -> None:\n        ...\n\n    # def extract_completions(self, prefix: str, tp: int = ...): ...\n    # def find_all_results(self): ...\n    # def find_all_results_with_text(self): ...\n    def command_history(self, delta: int, modifying_only: bool = ...) -> \'Tuple[str, dict, int]\':\n        ...\n\n    def overwrite_status(self) -> bool:\n        ...\n\n    def set_overwrite_status(self, value: bool) -> None:\n        ...\n\n    def show_popup_menu(self, items: List[str], on_select: \'Callable\', flags: int = ...) -> None:\n        ...\n\n    def show_popup(self,\n                   content: str,\n                   flags: int = ...,\n                   location: int = ...,\n                   max_width: int = ...,\n                   max_height: int = ...,\n                   on_navigate: Optional[Any] = ...,\n                   on_hide: Optional[Any] = ...) -> None:\n        ...\n\n    def update_popup(self, content: str) -> None:\n        ...\n\n    def is_popup_visible(self) -> bool:\n        ...\n\n    def hide_popup(self) -> None:\n        ...\n\n    def is_auto_complete_visible(self) -> bool:\n        ...\n\n    def change_id(self) -> Any:  # opaque handle object\n        ...\n\n    def transform_region_from(self, region: Region, change_id: Any) -> Region:\n        ...\n\n    def style_for_scope(self, scope: str) -> Dict[str, str]:\n        ...\n\n\nclass Buffer:\n    buffer_id = ...  # type: int\n\n    def __init__(self, id: int) -> None:\n        ...\n\n    def views(self) -> Optional[List[View]]:\n        ...\n\n    def primary_view(self) -> Optional[View]:\n        ...\n\n\nclass Phantom:\n    region = ...  # type: Region\n    content = ...  # type: Any\n    layout = ...  # type: Any\n    on_navigate = ...  # type: Any\n    id = ...  # type: Any\n\n    def __init__(self, region: Region, content: str, layout: int, on_navigate: Optional[Any] = ...) -> None:\n        ...\n\n    def __eq__(self, rhs: object) -> bool:\n        ...\n\n\nclass PhantomSet:\n    view = ...  # type: View\n    key = ...  # type: Any\n    phantoms = ...  # type: Any\n\n    def __init__(self, view: View, key: str = ...) -> None:\n        ...\n\n    def __del__(self) -> None:\n        ...\n\n    def update(self, new_phantoms: Sequence[Phantom]) -> None:\n        ...\n\n\nclass HistoricPosition:\n    pt = ...  # type: int\n    row = ...  # type: int\n    col = ...  # type: int\n    col_utf16 = ...  # type: int\n    col_utf8 = ...  # type: int\n\n\nclass TextChange:\n    a = ...  # type: HistoricPosition\n    b = ...  # type: HistoricPosition\n    str = ...  # type: str\n    len_utf8 = ...  # type: int\n    len_utf16 = ...  # type: int\n\n\nclass QuickPanelItem:\n    def __init__(\n        self,\n        trigger: str,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass ListInputItem:\n    def __init__(\n        self,\n        text: str,\n        value: Any,\n        details: Union[str, List[str]] = "",\n        annotation: str = "",\n        kind: Tuple[int, str, str] = KIND_AMBIGUOUS\n    ) -> None:\n        ...\n\n\nclass Html:\n    def __init__(\n        self,\n        text: str,\n    ) -> None:\n        ...\n', 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'version': 0, 'languageId': 'python'}}
:: <-- LSP-pyright workspace/configuration(2): {'items': [{'section': 'python', 'scopeUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP'}]}
:: >>> LSP-pyright 2: [{'venvPath': '', 'pythonPath': 'python', 'analysis': {'logLevel': 'Information', 'typeshedPaths': [], 'stubPath': './typings', 'extraPaths': ['/home/predragnikolic/.config/sublime-text/Packages/LSP/libs', '/home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/resources/typings/sublime_text', '/opt/sublime_text/Lib/python38', '/opt/sublime_text/Lib/python3', '/home/predragnikolic/.config/sublime-text/Lib/python38', '/opt/sublime_text/Packages', '/home/predragnikolic/.config/sublime-text/Packages/sublime_lib/st3', '/home/predragnikolic/.config/sublime-text/Packages/lsp_utils/st3', '/home/predragnikolic/.config/sublime-text/Packages/shellenv/all', '/home/predragnikolic/.config/sublime-text/Packages/coverage/st3_linux_x64', '/home/predragnikolic/.config/sublime-text/Packages/backrefs/st3', '/home/predragnikolic/.config/sublime-text/Packages/bracex/st3', '/home/predragnikolic/.config/sublime-text/Packages/pathlib/all', '/home/predragnikolic/.config/sublime-text/Packages/pyyaml/st3', '/home/predragnikolic/.config/sublime-text/Packages/typing/st3', '/home/predragnikolic/.config/sublime-text/Packages/jsonschema/all', '/home/predragnikolic/.config/sublime-text/Packages/mdpopups/st3', '/home/predragnikolic/.config/sublime-text/Packages/wcmatch/st3', '/home/predragnikolic/.config/sublime-text/Packages'], 'useLibraryCodeForTypes': True, 'diagnosticMode': 'openFilesOnly', 'autoSearchPaths': True, 'typeCheckingMode': 'basic', 'autoImportCompletions': True, 'diagnosticSeverityOverrides': {'reportUnusedVariable': 'information', 'reportImplicitStringConcatenation': 'warning', 'reportUnusedFunction': 'information', 'reportUnboundVariable': 'warning', 'reportMissingParameterType': 'none', 'reportDuplicateImport ': 'warning', 'reportUnusedImport': 'information', 'reportUninitializedInstanceVariable': 'none', 'reportUnusedClass': 'information'}}}]
:: <-- LSP-pyright workspace/configuration(3): {'items': [{'section': 'python.analysis', 'scopeUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP'}]}
:: >>> LSP-pyright 3: [{'logLevel': 'Information', 'typeshedPaths': [], 'stubPath': './typings', 'extraPaths': ['/home/predragnikolic/.config/sublime-text/Packages/LSP/libs', '/home/predragnikolic/.cache/sublime-text/Package Storage/LSP-pyright/resources/typings/sublime_text', '/opt/sublime_text/Lib/python38', '/opt/sublime_text/Lib/python3', '/home/predragnikolic/.config/sublime-text/Lib/python38', '/opt/sublime_text/Packages', '/home/predragnikolic/.config/sublime-text/Packages/sublime_lib/st3', '/home/predragnikolic/.config/sublime-text/Packages/lsp_utils/st3', '/home/predragnikolic/.config/sublime-text/Packages/shellenv/all', '/home/predragnikolic/.config/sublime-text/Packages/coverage/st3_linux_x64', '/home/predragnikolic/.config/sublime-text/Packages/backrefs/st3', '/home/predragnikolic/.config/sublime-text/Packages/bracex/st3', '/home/predragnikolic/.config/sublime-text/Packages/pathlib/all', '/home/predragnikolic/.config/sublime-text/Packages/pyyaml/st3', '/home/predragnikolic/.config/sublime-text/Packages/typing/st3', '/home/predragnikolic/.config/sublime-text/Packages/jsonschema/all', '/home/predragnikolic/.config/sublime-text/Packages/mdpopups/st3', '/home/predragnikolic/.config/sublime-text/Packages/wcmatch/st3', '/home/predragnikolic/.config/sublime-text/Packages'], 'useLibraryCodeForTypes': True, 'diagnosticMode': 'openFilesOnly', 'autoSearchPaths': True, 'typeCheckingMode': 'basic', 'autoImportCompletions': True, 'diagnosticSeverityOverrides': {'reportUnusedVariable': 'information', 'reportImplicitStringConcatenation': 'warning', 'reportUnusedFunction': 'information', 'reportUnboundVariable': 'warning', 'reportMissingParameterType': 'none', 'reportDuplicateImport ': 'warning', 'reportUnusedImport': 'information', 'reportUninitializedInstanceVariable': 'none', 'reportUnusedClass': 'information'}}]
:: <-- LSP-pyright workspace/configuration(4): {'items': [{'section': 'pyright', 'scopeUri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP'}]}
:: >>> LSP-pyright 4: [{'disableOrganizeImports': False, 'dev_environment': 'sublime_text_38', 'disableLanguageServices': False}]
LSP-pyright: Loading configuration file at /home/predragnikolic/.config/sublime-text/Packages/LSP/pyrightconfig.json
LSP-pyright: Assuming Python version 3.10
LSP-pyright: Assuming Python platform Linux
LSP-pyright: No include entries specified; assuming /home/predragnikolic/.config/sublime-text/Packages/LSP
LSP-pyright: Auto-excluding **/node_modules
LSP-pyright: Auto-excluding **/__pycache__
LSP-pyright: Auto-excluding **/.*
LSP-pyright: The stubPath has been specified in both the config file and the client settings. The value in the config file (/home/predragnikolic/.config/sublime-text/Packages/LSP/stubs) will take precedence
LSP-pyright: Searching for source files
LSP-pyright: Found 87 source files
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Loading configuration file at /home/predragnikolic/.config/sublime-text/Packages/LSP/pyrightconfig.json'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Assuming Python version 3.10'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Assuming Python platform Linux'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'No include entries specified; assuming /home/predragnikolic/.config/sublime-text/Packages/LSP'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Auto-excluding **/node_modules'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Auto-excluding **/__pycache__'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Auto-excluding **/.*'}
:: <-  LSP-pyright window/logMessage: {'type': 2, 'message': 'The stubPath has been specified in both the config file and the client settings. The value in the config file (/home/predragnikolic/.config/sublime-text/Packages/LSP/stubs) will take precedence'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Searching for source files'}
:: <-  LSP-pyright window/logMessage: {'type': 3, 'message': 'Found 87 source files'}
:: <-- LSP-pyright client/registerCapability(5): {'registrations': [{'method': 'workspace/didChangeWatchedFiles', 'registerOptions': {'watchers': [{'kind': 7, 'globPattern': '**/pyrightconfig.json'}, {'kind': 7, 'globPattern': '**'}]}, 'id': 'fd1962a4-056e-46b9-9490-d4a935030707'}]}
:: >>> LSP-pyright 5: None
:: <-- LSP-pyright client/unregisterCapability(6): {'unregisterations': [{'method': 'workspace/didChangeWatchedFiles', 'id': '9cd172d5-e3f7-4efc-883f-ef921d457f44'}]}
:: >>> LSP-pyright 6: None
::  -> LSP-pyright textDocument/didSave: {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}}
::  -> diagnostic-ls textDocument/didSave: {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'type': 2}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'type': 2}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3', 'type': 1}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/.tox/py3/bin/python3.10', 'type': 1}]}
:: <-  LSP-pyright textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'version': 0}
:: --> LSP-pyright textDocument/codeAction(2): {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}, 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}, 'context': {'diagnostics': [], 'triggerKind': 2}}
:: <<< LSP-pyright 2: []
::  -> LSP-pyright textDocument/didSave: {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}}
::  -> diagnostic-ls textDocument/didSave: {'textDocument': {'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi'}}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'type': 2}]}
::  -> LSP-pyright workspace/didChangeWatchedFiles: {'changes': [{'uri': 'file:///home/predragnikolic/.config/sublime-text/Packages/LSP/stubs/sublime.pyi', 'type': 2}]}

apparetnly diagnostic-ls never publishes the diagnostics.

@rchl
Copy link
Member Author

rchl commented Sep 22, 2022

I think I have misunderstood a bit how diagnostics version works. Server can report outdated diagnostics for given version and then update them later for the same version. That messes up with the logic I've applied here...

It's then pretty hard to fix reliably so that the panel only opens/closes after save rather than whenever diagnostics change.

* main:
  Ensure "Source Actions..." request includes the "source" kind (#2064)
@rchl
Copy link
Member Author

rchl commented Sep 24, 2022

Implemented new approach that should work better.

As long as view's change_count matches change_count of last save then the updated diagnostics can force the panel to hide or show. That allows servers some time to send updated diagnostics to which we can react, as long as view wasn't edited in the meantime.

Copy link
Member

@predragnikolic predragnikolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty happy with how this PR ended up.
Hopefully now the all issues regarding diagnostic panel on save are fixed with this PR.

I am just looking at a way if we can remove some code,
but we can do that later if necessary.

@rchl rchl merged commit de2cd85 into main Sep 26, 2022
@rchl rchl deleted the fix/diags_panel_on_save branch September 26, 2022 07:09
rchl added a commit that referenced this pull request Sep 27, 2022
* main:
  Fix issues with diagnostics panel toggling on save (#2063)
  Request color presentations when clicking on a color box (#2065)
  Import new imports like NotRequired from "typing"
  Ensure "Source Actions..." request includes the "source" kind (#2064)
  refactor(types): Mark properties with NotRequired (#2062)
  Add template variable `$text_document_position` in execute command (#2061)
  Only update content of diagnostics panel when visible (#2054)
  Remove Range class and rename RangeLsp to Range (#2058)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants