It hasn’t been merged yet, but to get the same behaviour, you can install the build package (version 0.63.0), install the linter package (search for linter base) and create an .atom-build.js in your project root with the following content:
module.exports = {
cmd: "cargo",
args: ["build"],
env: {
"RUSTFLAGS": "-Z unstable-options --error-format=json"
},
functionMatch: function(output) {
var array = [];
function level2severity(level) {
switch (level) {
case 'warning': return 'warning';
case 'error': return 'error';
case 'note': return 'info';
default: return 'error';
}
}
output.split(/\n/).forEach(line => {
if (line[0] != '{') {
return;
}
const json = JSON.parse(line);
var trace = [];
json.children.forEach(child => {
child.spans.forEach(span => {
trace.push({
message: child.message,
file: span.file_name,
line: span.line_start,
line_end: span.line_end,
col: span.column_start,
col_end: span.column_end,
type: 'Trace', // FIXME: change to `child.level` after https://github.com/steelbrain/linter/issues/1149 is fixed
severity: level2severity(json.level),
});
});
});
if (json.code) {
trace.push({
message: json.code.explanation,
type: "Explanation",
severity: 'info',
});
}
json.spans.forEach(span => {
array.push({
message: json.message,
file: span.file_name,
line: span.line_start,
line_end: span.line_end,
col: span.column_start,
col_end: span.column_end,
type: json.level, // FIXME: change to `json.code ? json.code : json.level` after https://github.com/steelbrain/linter/issues/1149 is fixed
severity: level2severity(json.level),
trace: trace,
});
});
});
return array;
}
};
Adding the .atom-build.js file from within atom might require an atom restart (Ctrl + Alt + R).
Then you should be able to press Ctrl + Alt + B to trigger a build. The exact keys may vary between operating systems (F6 seems to work, too).