From d6a6f91d85b8a95b60c2acd808a2efca7927e5d3 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Tue, 27 Aug 2024 17:46:50 -0700 Subject: [PATCH] Add option to disable hover. Closes #40 --- RainbowCSV.sublime-settings | 2 ++ main.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/RainbowCSV.sublime-settings b/RainbowCSV.sublime-settings index 90c7f68..0845518 100644 --- a/RainbowCSV.sublime-settings +++ b/RainbowCSV.sublime-settings @@ -9,6 +9,8 @@ // Files with ".csv" and ".tsv" extensions are always highlighted no matter what is the value of this option. "enable_rainbow_csv_autodetect": true, + // Enable the hover popup that shows additional Rainbow CSV context. + "show_rainbow_hover": true, // List of CSV dialects to autodetect. // "simple" - separators CAN NOT be escaped in a double quoted field, double quotes are ignored diff --git a/main.py b/main.py index 33c9cff..ca51c88 100644 --- a/main.py +++ b/main.py @@ -1013,6 +1013,9 @@ def is_applicable(cls, settings): return get_dialect(settings)[1] != 'monocolumn' def on_hover(self, point, hover_zone): + if not get_setting(self.view, 'show_rainbow_hover', True): + return + if hover_zone == sublime.HOVER_TEXT: dialect = get_dialect(self.view.settings()) if dialect[1] == 'monocolumn':