Fix editor extension settings not properly reflected #2090
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug description
settings.enableInlineDataview
) nor "Enable Inline JavaScript Queries" (settings.enableInlineDataviewJS
) is turned on when the plugin's loading, any inline queries are not enabled even if these settings are turned on later on.settings.prettyRenderInlineFields
).1 is caused by how
cmExtension
is treated in the plugin'sonload
method:obsidian-dataview/src/main.ts
Lines 102 to 106 in 52fcd0b
Here, the comment mentions dynamic updates, but in fact, the editor extensions are not dynamically updated at all.
obsidian-dataview/src/main.ts
Lines 41 to 42 in 52fcd0b
So, I updated
main.ts
so that the editor extensions are dynamically updated according to the settings.https://github.com/RyotaUshio/obsidian-dataview/blob/892d343ea9b9845221e2c7ee604ad46bc4d73f0e/src/main.ts#L183-L196
https://github.com/RyotaUshio/obsidian-dataview/blob/892d343ea9b9845221e2c7ee604ad46bc4d73f0e/src/main.ts#L343
Thank you!