Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b74794a
commit 80162b3
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
/* | ||
Enable this if you use Kite plugin for Sublime Text 3 | ||
but you still want to use anaconda functionality. | ||
Note: this option will disable the following anaconda features: | ||
* Autocompletion | ||
* Signature popups | ||
*/ | ||
"integrate_with_kite": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import sublime | ||
|
||
|
||
class Integration: | ||
"""Checks if Kite integration is turned on | ||
""" | ||
|
||
@classmethod | ||
def enabled(cls): | ||
"""Returns True if Kite integration is enabled | ||
""" | ||
|
||
settings = sublime.load_settings('AnacondaKite.sublime-settings') | ||
enabled = settings.get('integrate_with_kite', False) | ||
if enabled: | ||
try: | ||
from Kite.lib.installer import check | ||
from Kite.lib.exceptions import KiteNotSupported | ||
if not check.is_running(): | ||
return False | ||
except ImportError: | ||
return False | ||
except KiteNotSupported: | ||
# Kite will raise KiteNotSupported on Linux | ||
return True | ||
|
||
return True | ||
|
||
return False | ||
|
||
@classmethod | ||
def enable(cls): | ||
"""Enable Kite integration | ||
""" | ||
|
||
settings = sublime.load_settings('AnacondaKite.sublime-settings') | ||
settings.set('integrate_with_kite', True) | ||
settings.save_settings('AnacondaKite.sublime-settings') | ||
|
||
@classmethod | ||
def disable(cls): | ||
"""Disable Kite integration | ||
""" | ||
|
||
settings = sublime.load_settings('AnacondaKite.sublime-settings') | ||
settings.set('integrate_with_kite', False) | ||
settings.save_settings('AnacondaKite.sublime-settings') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters