import { autocompletion, closeBrackets } from '@codemirror/autocomplete';
import { PluginType } from './index.js';
import 'solid-js/web';
import 'solid-js';
import '@codemirror/state';
import '@codemirror/lang-markdown';
import '@codemirror/language-data';
import '@codemirror/view';
import '@codemirror/language';
import '@codemirror/commands';
import '@lezer/highlight';

const autocomplete = (options) => {
  const completions = options.plugins.flatMap((plugin) => {
    return plugin.type === PluginType.Completion ? plugin.value : [];
  });
  return [
    autocompletion({
      defaultKeymap: true,
      icons: false,
      override: completions,
      optionClass: () => "ink-tooltip-option"
    }),
    closeBrackets()
  ];
};

export { autocomplete };
//# sourceMappingURL=autocomplete-fe9906b2.js.map
