Skip to content

Allow the user to control the process of loading grammars & themes #31

Open
@tom-sherman

Description

@tom-sherman

The current behaviour is a good default as it mostly just works across all environments. However there are cases where I want to be in control of how/when the grammars and themes are loaded. In general: as a user I want to tightly control the IO operations of the library.

Consider the following use cases:

  • I'm running lighter in an environment without network access, I instead want to choose to read the grammar/theme from the filesystem or other async IO
  • I'm running lighter without access to a filesystem or any other kind of IO, instead I want to read the grammar/theme from memory
  • I'm running lighter in an environment where I want to customise the fetch call. eg. in Next.js I want to pass next: { revalidate: ... }

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