Skip to content
Open
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
3 changes: 3 additions & 0 deletions lib/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module.exports =
maxLineLength:
type: 'integer'
default: 100
grammars:
type: 'array'
default: ["Python", "MagicPython"]
cmdLineOptions:
type: 'array'
default: []
Expand Down
6 changes: 4 additions & 2 deletions lib/python-autopep8.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class PythonAutopep8
editor = atom.workspace.getActiveTextEditor()
if not editor?
return false
grammar = editor.getGrammar().name
return grammar == 'Python' or grammar == 'MagicPython'
grammarNames = atom.config.get "python-autopep8.grammars"
grammarName = editor.getGrammar().name
return grammarName in grammarNames

removeStatusbarItem: =>
@statusBarTile?.destroy()
Expand Down Expand Up @@ -42,6 +43,7 @@ class PythonAutopep8

format: ->
if not @checkForPythonContext()
@updateStatusbarText("x", true)
return

cmd = atom.config.get "python-autopep8.autopep8Path"
Expand Down