Skip to content

Use decorations instead of inserts? #28

Open
@tmcw

Description

@tmcw

So right now this plugin works by inserting real code into your text editor. This is basically inherited from the implementation in modeling-app. The pro of this is that the 'ghost text' gets proper syntax coloring and behaves like real code. The con is that when we insert ghost text, it generates real change events, so the actual code in the editor changes when you have ghost text displayed. So you can get into situations like:

  1. You're editing some text
  2. You end a line of text with something
  3. Codeium feels like it has a good suggestion to show you
  4. The suggestion is displayed briefly
  5. You close the tab
  6. When you re-open the tab, the ghost text is shown as "unsaved changes that were recovered" (if you have a recovery system)

This is obviously less than ideal, and ends up with (in our case) having a method exposed like shouldTakeUpdate which lets upstream systems ignore change events. But the whole necessity of that shouldTakeUpdate method is driven just by the fact that ghost text is, surprisingly, real code in your editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions