diff --git a/lib/ide-flow.coffee b/lib/ide-flow.coffee index d3f927d..f8fd54b 100644 --- a/lib/ide-flow.coffee +++ b/lib/ide-flow.coffee @@ -22,6 +22,9 @@ module.exports = require './flow-autocomplete-provider' config: + checkAllFiles: + type: 'boolean' + default: false checkOnFileSave: type: 'boolean' default: true diff --git a/lib/utils.coffee b/lib/utils.coffee index 713acec..91c25ac 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -5,6 +5,8 @@ isFlowSource = (editor) -> fname = buffer.getUri() isFlow = false if path.extname(fname) in ['.js', '.jsx'] + if atom.config.get('ide-flow.checkAllFiles') + isFlow = true if buffer.lineForRow(buffer.nextNonBlankRow -1)?.match(/\/\*/) buffer.scan /\/\*(.|\n)*?\*\//, (scan) => isFlow = true if scan.matchText.match(/@flow/)