def on_query_completions(self, view, _prefix, _locations): if not HAS_SUBLIME_REPL or not Common.view_is_haskell_repl(view): return [] compl_flags = sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS replv = sublimerepl.manager.repl_view(view) command = self.COMMAND_RE.match(replv.user_input) if command: cmd, arg = command.group(1, 3) if cmd == 'show': return (self.GHCI_SHOW_ARG, compl_flags) elif cmd == 'showi': return (self.GHCI_SHOWI_ARG, compl_flags) elif cmd and not arg: return (self.GHCI_CMDS, compl_flags) # Have a command and an argument, but we don't know what to do with the argument... return [] # Kind of a punt -- use word completions based on whatever ST finds in the view's buffer. return ([], sublime.INHIBIT_EXPLICIT_COMPLETIONS)
def context_haskell_repl(self, view, _key, _operator, _operand, _matchall): return Common.view_is_haskell_repl(view)
def is_enabled(self): return Common.view_is_haskell_source(self.view) or Common.view_is_haskell_repl(self.view) or \ (Common.view_is_haskell_symbol_info(self.view) and self.view.settings().get('location'))
def is_visible(self): return Common.view_is_haskell_source(self.view) or Common.view_is_haskell_repl(self.view)
def is_visible(self): return Common.view_is_haskell_symbol_info(self.view) or \ Common.view_is_haskell_source(self.view) or \ Common.view_is_haskell_repl(self.view)
def is_enabled(self): return (self.view.settings().get('package') is not None) or \ Common.view_is_haskell_source(self.view) or \ Common.view_is_haskell_repl(self.view)
def context_haskell_repl(self, view, _key, _operator, _operand, _matchall): return Common.view_is_haskell_repl(view)