diff --git a/Default.sublime-commands b/Default.sublime-commands index 10d705e..44ae317 100644 --- a/Default.sublime-commands +++ b/Default.sublime-commands @@ -22,5 +22,9 @@ { "caption": "tern_for_sublime: Disable Project", "command": "tern_disable_project" + }, + { + "caption": "tern_for_sublime: Show Argument Hints", + "command": "tern_show_arg_hints" } ] diff --git a/tern.py b/tern.py index 8e292ed..e9e8d15 100644 --- a/tern.py +++ b/tern.py @@ -624,6 +624,15 @@ def run(self, edit, **args): pfile = get_pfile(self.view) pfile.project.disabled = True +class TernShowArgHints(sublime_plugin.WindowCommand): + def run(self, **args): + view = self.window.active_view() + if not view: + return + pfile = get_pfile(view) + if pfile is not None: + show_argument_hints(pfile, view) + # fetch a certain setting from the package settings file and if it doesn't exist check the # Preferences.sublime-settings file for backwards compatibility. def get_setting(key, default):