I'm new to ace-editor and I have used ace-rails-ap gem and I have included custom mode to validate my code, every line should end up with semicolon, If semicolon is not present in my query by mistake then the editor should give warning like "Missing Semicolon", by the way it should behave like spell check.
I tried with the following code:
editor.setOption("spellcheck", true) but spellchecking is not working and I'm seeing a "misspelled option "spellcheck" message in the console.
How to integrate the above check to my custom mode
$('#editor').on('input', function() {lines = editor.session.doc.getAllLines();for (var i = 0; i < lines.length; i++) {
if (!/;\s*$/.test(lines[i])) {
editor.session.setAnnotations([{row: i,column: lines[i],text: "Missing semicolon ;",type: "error"}]);}}});editor.session.setOption("useWorker", false)
editor.session.setOption("useWorker", false)
but it couldn't resolve it.
Any helps are greatly appreciated as I have spent a day while trying to sort this out.