Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to enable/disable the settings quick edit (pencil) icon. #353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Package/PackageDev.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
// Each theme containing one of the list's strings is hidden.
"settings.exclude_theme_patterns": [],

// Whether to show the edit settings pencil icon. Close & reopen the
// settings file for this to take effect.
"settings.show_quick_edit_icon": true,

// Whether or not to keep the scope suffix in the suggested test scopes
// i.e. if the base scope is text.html.markdown
// then suggest meta.example.markdown (true) vs meta.example (false).
Expand Down
4 changes: 2 additions & 2 deletions plugins/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(self, view):
logger.error("Not a Sublime Text Settings or Project file: %r", filepath)

self.phantom_set = sublime.PhantomSet(self.view, "sublime-settings-edit")
if self._is_base_settings_view():
if self._is_base_settings_view() and get_setting("settings.show_quick_edit_icon"):
self.build_phantoms()

def __del__(self):
Expand All @@ -156,7 +156,7 @@ def __del__(self):
def on_modified_async(self):
"""Sublime Text modified event handler to update linting."""
self.do_linting()
if self._is_base_settings_view():
if self._is_base_settings_view() and get_setting("settings.show_quick_edit_icon"):
# This may only occur for unpacked packages
self.build_phantoms()

Expand Down