diff --git a/Anaconda.sublime-settings b/Anaconda.sublime-settings index 5ff4d2ae..325d7479 100644 --- a/Anaconda.sublime-settings +++ b/Anaconda.sublime-settings @@ -635,5 +635,11 @@ "current_test": "", "project_tests": "" }, - "swallow_startup_errors": false + "swallow_startup_errors": false, + + /* + If this is set to true, anaconda will uload plugins that + make it malfunction intefering with it + */ + "auto_unload_conflictive_plugins": true } diff --git a/anaconda.py b/anaconda.py index e23d04db..f3e01e29 100644 --- a/anaconda.py +++ b/anaconda.py @@ -16,6 +16,7 @@ import sublime_plugin from .anaconda_lib import ioloop +from .anaconda_lib.helpers import get_settings from .commands import * from .listeners import * @@ -71,16 +72,51 @@ def monitor_plugins(): """Monitor for any plugin that conflicts with anaconda """ + view = sublime.active_window().active_view() + if not get_settings(view, 'auto_unload_conflictive_plugins', True): + return + plist = [ - 'Jedi - Python autocompletion', 'SublimePythonIDE', 'SublimeCodeIntel' + 'Jedi - Python autocompletion', # breaks auto completion + 'SublimePythonIDE', # interfere with autocompletion + 'SublimeCodeIntel' # breaks everything, SCI is a mess + ] + hllist = [ + 'MagicPython', # breaks autocompletion on [dot] + 'Python 3' # breeaks autocompletion on [dot] ] + for plugin in plist: if plugin in sys.modules: - [sublime_plugin.unload_module(m) for k, m in sys.modules.items() if plugin in k] # noqa + [ + sublime_plugin.unload_module(m) for k, m in sys.modules.items() + if plugin in k + ] if plugin not in DISABLED_PLUGINS: DISABLED_PLUGINS.append(plugin) - sublime.set_timeout_async(monitor_plugins, 30000) + for highlighter in hllist: + paths = os.listdir(sublime.packages_path()) + \ + os.listdir(sublime.installed_packages_path()) + + for p in paths: + if highlighter in p: + fname = '{0}.sublime-settings'.format(highlighter) + s = sublime.load_settings(fname) + if all((s.has('auto_complete_triggers'), s.has('extensions'))): + break + auto_complete = [ + { + 'characters': '.', + 'selector': 'source.python - string - constant.numeric', # noqa + } + ] + s.set('extensions', ['py']) + s.set('auto_complete_triggers', auto_complete) + sublime.save_settings(fname) + break + + sublime.set_timeout_async(monitor_plugins, 500000) def enable_plugins(): diff --git a/messages.json b/messages.json index 1413719a..b425a51a 100644 --- a/messages.json +++ b/messages.json @@ -56,5 +56,6 @@ "2.1.3": "messages/2.1.3.txt", "2.1.4": "messages/2.1.4.txt", "2.1.5": "messages/2.1.5.txt", - "2.1.6": "messages/2.1.6.txt" + "2.1.6": "messages/2.1.6.txt", + "2.1.7": "messages/2.1.7.txt" } diff --git a/messages/2.1.7.txt b/messages/2.1.7.txt new file mode 100644 index 00000000..a3bd8aea --- /dev/null +++ b/messages/2.1.7.txt @@ -0,0 +1,16 @@ + + | + _` | __ \ _` | __| _ \ __ \ _` | _` | + ( | | | ( | ( ( | | | ( | ( | + \__,_| _| _| \__,_| \___| \___/ _| _| \__,_| \__,_| + The Sublime Text 3 Python IDE + + +Anaconda v2.1.7 +=============== + +Welcome to new anaconda v2.1.7, what do you can find in this minor release? + +## Enhancements + + - Auto disable conflictive plugins while anaconda is active