Skip to content

Instantly share code, notes, and snippets.

@marbemac
Created March 28, 2019 05:09
Show Gist options
  • Save marbemac/99ca51fb1e871c888dc33b455240f08d to your computer and use it in GitHub Desktop.
Save marbemac/99ca51fb1e871c888dc33b455240f08d to your computer and use it in GitHub Desktop.
module.exports = {
async activate() {
SL.graph.onDidChangeSourceNodeContent(({ node }) => {
if (!node || node.subtype !== 'md') return;
let diagnostics = [];
if (node.raw.match('swagger')) {
diagnostics = [
{
code: 'swagger-check',
severity: 0,
message: 'get outta here swagger!'
}
];
}
SL.graph.setSourceNodeDiagnostics(node.id, diagnostics);
})
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment