Hi,
I am using codemirror for my sql editor and using sql from ‘@codemirror/lang-sql’
When I don’t give any custom auto complete list I am able to see the keywords getting highlighted but after I give my custom list that’s not highlighting in different color.
const startState = EditorState.create({
doc: docContent,
extensions: [
placeholder(
'Your metric definition(SQL) comes here, you need not include table, group or split.
eg:countDistinct(field_name)',
),
basicSetup,
wordToolTip,
autocompletion({
// override: [myAutoCompletionList],
}),
sql(),
EditorView.updateListener.of(update => {
if (update.docChanged) {
onChange && onChange(update.state);
}
}),
In the above code I have commented my autocomplete list, if I uncomment I am not syntax highlighting, Can you please suggest any reason behind this or I am doing anything wrong in giving the list?