diff --git a/init.coffee b/init.coffee index 3710783..02605c3 100644 --- a/init.coffee +++ b/init.coffee @@ -37,7 +37,7 @@ module.exports = AtomLanguageMZN = return { name: 'MiniZinc', grammarScopes: ['source.mzn'], - scope: 'file', # or 'project' - lintOnFly: true, + scope: 'file', + lintsOnChange: true, lint: @provider.lint } diff --git a/linter-mzn.coffee b/linter-mzn.coffee index 7f2e306..65140e3 100644 --- a/linter-mzn.coffee +++ b/linter-mzn.coffee @@ -61,10 +61,12 @@ class LinterMZN endcol = output[2].match(/\^(\s|$)/).index + 1 message = { - type: 'Error', - text: output[1..].join('\n').replace(/MiniZinc: /, ""), - range: [[line-1,startcol], [line-1,endcol]], - filePath: filePath, + severity: 'error', + excerpt: output[1..].join('\n').replace(/MiniZinc: /, ""), + location:{ + file: filePath, + position: [[line-1,startcol], [line-1,endcol]], + } } return message