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 syntax highlighting and collapsing with fountain format for script editor #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lalalune
Copy link
Collaborator

@lalalune lalalune commented Jul 12, 2024

This PR adds syntax highlighting and collapsing / expanding for the fountain format to the script editor.

Solves some but not all of these: #14

I couldn't find anything for fountain and monaco. There is the betterfountain project for vscode, which probably has really nice detailed advanced features. but this solution is relatively simple and seems to get the job done for my test script.

I tried undo/redo buttons and didn't like them. key commands with ctrl z // cmd z work.

Screenshot 2024-07-11 at 10 37 36 PM Screenshot 2024-07-11 at 10 36 51 PM

@jbilcke-hf
Copy link
Owner

Sorry I haven't had time to check it out yet, tomorrow I will have 3 hours of high speed train so I will take a better look 💪

@jbilcke-hf jbilcke-hf added new feature prompt editor Editor of stories and screenplays labels Jul 12, 2024
const model = editor.getModel();
if (model) {
const fullRange = model.getFullModelRange();
model.tokenization.forceTokenization(fullRange.endLineNumber);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this triggers the following build error:

Property 'tokenization' does not exist on type 'ITextModel'.

@lalalune lalalune closed this Aug 14, 2024
@lalalune lalalune reopened this Aug 14, 2024
@lalalune lalalune force-pushed the moon/update-script-editor branch 3 times, most recently from cdedae6 to 680cee8 Compare August 14, 2024 03:14
@lalalune lalalune force-pushed the moon/update-script-editor branch from 680cee8 to 05138ef Compare August 14, 2024 03:33
@lalalune
Copy link
Collaborator Author

@jbilcke-hf I have refreshed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature prompt editor Editor of stories and screenplays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants