LanguageData setting is not working in the nested language

I am developing an editor for a SQL-like database query language(GSQL) using codemirror and lezer. I am using Lezer’s nested grammar since this language can be nested within some database command statements.

Here is the code of how I define the language:

const mixedScriptParser = scriptParser.configure({
  wrap: parseMixed((node) => {
    return node.name == 'QueryText' ? { parser: queryParser } : null;
  }),
  props: [
    styleTags({
      [baseTypes.join(' ')]: t.typeName,
      'TRUE FALSE': t.bool,
      NULL: t.null,
      Number: t.number,
      [scriptKws.join(' ')]: t.keyword,
      String: t.string,
      Identifier: t.name,
      LineComment: t.lineComment,
      BlockComment: t.blockComment,
      '.': t.derefOperator,
      '( )': t.paren,
      '{ }': t.brace,
      '[ ]': t.squareBracket,
      '< >': t.angleBracket,
    }),
  ],
});

export function gsql(config: GSQLConfig = {}) {
  const language = LRLanguage.define({
    name: 'gsql',
    parser: mixedScriptParser,
    languageData: {
      commentTokens: { line: '//', block: { open: '/*', close: '*/' } },
      closeBrackets: { brackets: ['(', '[', '{', "'", '"', '`', '<'] },
    },
  });

  return new LanguageSupport(language, [
    autocompletion({
      override: [
        completeFromKeywords(),
        completeFromIdents(),
        completeFromAccumTypes(),
        completeFromBaseTypes(),
        completeFromSchema(),
      ],
    }),
  ]);
}

queryParser is the lezer-generated parser for the query language.

The issue is that seems the languageData configuration only works outside the nested language. It has no effect if I trigger the shortcut of toggleComment command in the nested language.

How are you associating language data with queryParser?

Also, using the autocompletion override option in a language’s support extensions is probably not a good idea. It’ll override the completion used anywhere in the editor. You should use language data to register language-specific completion sources as well.

Thanks marijin. The issue is fixed after setting languageDataProp in the query parser.
I will also remove the use of override option of autocomplete.