Skip to content

Make settings & state buffer local #22

@alerque

Description

@alerque

As of #21 being merged to fix #7 the parser actually loads up and parses only the extensions enabled by user settings.

However ... these settings are only global (g:commonmark#...) and furthermore can only be set once before the Rust module is loaded. Once it is loaded it keeps its own state. Globally.

  1. Add buffer local setting options (b:commonmark#...) that can override their global counterparts.

  2. Keep the parser state separately for each buffer. Not sure how this will work with Lua's module scoping. We may need to keep a state object either in Lua or keep a hash table of per-buffer options in Rust.

  3. Allow updating the settings. If we can't capture the settings being chaged there at least needs to be some way to re-init.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions