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

Add API for setting smart cell editor source and intellisense node #390

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

jonatanklosko
Copy link
Member

Currently we set intellisense node through the client as ctx.setSmartCellEditorIntellisenseNode(node, cookie), but if there are multiple clients we run this for each of them, which doesn't really make sense. I added a new option to the smart cell init configuration, so we can do {:ok, ctx, [editor: [..., intellisense_node: ...]]}, which sets the initial value. Then, it can be updated with a new API reconfigure_smart_cell(ctx, editor: [intellisense_node: ...]).

I also added an option to programmatically set the smart cell source with reconfigure_smart_cell(ctx, editor: [source: ...]).

@jonatanklosko jonatanklosko merged commit 9f5d073 into main Jan 31, 2024
1 check passed
@jonatanklosko jonatanklosko deleted the jk-smart-cell-editor branch January 31, 2024 11:42
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

Successfully merging this pull request may close these issues.

2 participants