def on_selection_modified(self, view): if not is_haskell_view(view): return window = view.window() if not StackIDEManager.is_running(window): return # Only try to get types for views into files # (rather than e.g. the find field or the console pane) if view.file_name(): # Uncomment to see the scope at the cursor: # Log.debug(view.scope_name(view.sel()[0].begin())) request = Req.get_exp_types(span_from_view_selection(view)) send_request(window, request, Win(window).highlight_type)
def run(self,edit): request = Req.get_exp_types(span_from_view_selection(self.view)) send_request(self.view.window(),request, self._handle_response)