diff --git a/Default.sublime-keymap b/Default.sublime-keymap index 2b9760d23..d95ffdb9e 100644 --- a/Default.sublime-keymap +++ b/Default.sublime-keymap @@ -211,6 +211,7 @@ // { // "keys": ["primary+shift+a"], // "command": "lsp_expand_selection", + // "args": {"fallback": false}, // "context": [{"key": "lsp.session_with_capability", "operand": "selectionRangeProvider"}] // }, // Fold around caret position - an optional "strict" argument can be used to configure whether diff --git a/plugin/selection_range.py b/plugin/selection_range.py index cd30de558..d318a721b 100644 --- a/plugin/selection_range.py +++ b/plugin/selection_range.py @@ -17,15 +17,15 @@ def __init__(self, view: sublime.View) -> None: self._regions = [] # type: List[sublime.Region] self._change_count = 0 - def is_enabled(self, event: Optional[dict] = None, point: Optional[int] = None, fallback: bool = True) -> bool: + def is_enabled(self, event: Optional[dict] = None, point: Optional[int] = None, fallback: bool = False) -> bool: return fallback or super().is_enabled(event, point) - def is_visible(self, event: Optional[dict] = None, point: Optional[int] = None, fallback: bool = True) -> bool: + def is_visible(self, event: Optional[dict] = None, point: Optional[int] = None, fallback: bool = False) -> bool: if self.applies_to_context_menu(event): return self.is_enabled(event, point, fallback) return True - def run(self, edit: sublime.Edit, event: Optional[dict] = None, fallback: bool = True) -> None: + def run(self, edit: sublime.Edit, event: Optional[dict] = None, fallback: bool = False) -> None: position = get_position(self.view, event) if position is None: return