Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make settings & state buffer local #22

Open
alerque opened this issue May 20, 2020 · 0 comments
Open

Make settings & state buffer local #22

alerque opened this issue May 20, 2020 · 0 comments

Comments

@alerque
Copy link
Owner

alerque commented May 20, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant