Skip to content

Commit

Permalink
Add option to disable hover.
Browse files Browse the repository at this point in the history
Closes #40
  • Loading branch information
parasyte committed Aug 28, 2024
1 parent f8f8091 commit d6a6f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RainbowCSV.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit d6a6f91

Please sign in to comment.