diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a50863a..f015c9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ repos: rev: stable hooks: - id: black + entry: bash -c 'black "$@"; git add -u' -- language_version: python3 - repo: https://gitlab.com/pycqa/flake8 rev: 3.7.9 diff --git a/completions/completions_v2.py b/completions/completions_v2.py index bbf9c03..6f8e81d 100644 --- a/completions/completions_v2.py +++ b/completions/completions_v2.py @@ -42,7 +42,7 @@ "paste", ] -STARS_PREFIX = "✨" +ATTRIBUTION_ELEMENT = "⌬" class TabNineCommand(sublime_plugin.TextCommand): @@ -133,7 +133,7 @@ def on_selection_modified(self, view): def on_activated(self, view): self.on_any_event(view) - view.set_status("tabnine-status", "TabNine " + STARS_PREFIX) + view.set_status("tabnine-status", ATTRIBUTION_ELEMENT + " TabNine") def on_query_completions(self, view, prefix, locations): def _run_complete(): @@ -223,9 +223,7 @@ def _run_complete(): def get_completion(self): return [ [ - "{}\t{} {}".format( - r.get("new_prefix"), r.get("detail", "TabNine"), STARS_PREFIX - ), + "{}\t{} {}".format(r.get("new_prefix"), ATTRIBUTION_ELEMENT, "TabNine"), "{}$0{}".format(r.get("new_prefix"), r.get("new_suffix", "")), ] for r in self._results