import { autocompletion } from '@codemirror/autocomplete';
import { defineLanguageFacet, Language, LanguageSupport, } from '@codemirror/language';
import { completionStyles, cypherAutocomplete } from './autocomplete';
import { ParserAdapter } from './parser-adapter';
import { signatureHelpTooltip } from './signatureHelp';
import { cypherLinter } from './syntaxValidation';
const facet = defineLanguageFacet({
    commentTokens: { block: { open: '/*', close: '*/' }, line: '//' },
    closeBrackets: { brackets: ['(', '[', '{', "'", '"', '`'] },
});
export function cypher(config) {
    const parserAdapter = new ParserAdapter(facet, config);
    const cypherLanguage = new Language(facet, parserAdapter, [], 'cypher');
    return new LanguageSupport(cypherLanguage, [
        autocompletion({
            override: [cypherAutocomplete(config)],
            optionClass: completionStyles,
        }),
        cypherLinter(config),
        signatureHelpTooltip(config),
    ]);
}
//# sourceMappingURL=langCypher.js.map