Autocomplete

Configuration

Options of the completion menus.
comark({
  completion: {
    slash: true,   // `/` at the start of a line opens the block menu
    chain: true,   // reopen the menu after a pick that has a next step
    drill: true,   // → drills in, ← goes back
    info: 'auto',  // the docs panel; false hides it
    maxItems: 80,  // rendered options
    icons: true,
  },
})

Where items come from

SourceOption
Components, props, slotscomponents and plugin manifests (Components)
Frontmatter keys and valuesfrontmatterSchema (JSON Schema)
data.*, meta.* bindingsdata / dataSchema, meta / metaSchema (Bindings)
Pages and assets in linkslinks: an array of { url, title?, kind? } or a function of the typed text (may be async)
Fence languagescodeLanguages (CodeMirror LanguageDescriptions) and plugins
Anything elsea plugin with completions or snippets

Other options

OptionDefault
plugins[]editor plugins; a later plugin replaces an earlier one with the same name
registerDefaultPluginstruecomark's defaults: alert, attributes, components, frontmatter, html, task-list
linttruestructural, manifest and binding diagnostics
hovertruedocs on hover
keymaptruemarks, headings, lists, tasks, the component closer on Enter
themetruemenu and syntax theme
Copyright © 2026