We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 407d1f1 commit 742627aCopy full SHA for 742627a
addon/hint/sql-hint.js
@@ -23,14 +23,16 @@
23
24
function isArray(val) { return Object.prototype.toString.call(val) == "[object Array]" }
25
26
+ function getModeConf(editor) {
27
+ return editor.getModeAt(editor.getCursor()).config || CodeMirror.resolveMode("text/x-sql")
28
+ }
29
+
30
function getKeywords(editor) {
- return editor.getModeAt(editor.getCursor()).keywords || CodeMirror.resolveMode("text/x-sql").keywords;
31
+ return getModeConf(editor).keywords || []
32
}
33
34
function getIdentifierQuote(editor) {
- return editor.getModeAt(editor.getCursor()).identifierQuote ||
- CodeMirror.resolveMode("text/x-sql").identifierQuote ||
- "`";
35
+ return getModeConf(editor).identifierQuote || "`";
36
37
38
function getText(item) {
mode/sql/sql.js
0 commit comments