Codemirror 6 Autocomplete Dropdown

Hello, is there any examples of overriding the available autocomplete options with custom options (such as javascript commands)? I have been struggling with this for a bit and I have not had any luck. Any help or examples would be great, and thanks in advance!

You can override the completion sources here

Here’s an example:

  override: [async (ctx) => {
    return {
      from: ctx.pos, // Autocomplete position
      options: [ // List of options
          label: 'custom'
          apply: 'command' // Text to replace