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

Default language setting #61

Open
gusye1234 opened this issue Dec 24, 2023 · 5 comments · May be fixed by #112
Open

Default language setting #61

gusye1234 opened this issue Dec 24, 2023 · 5 comments · May be fixed by #112
Labels
enhancement New feature or enhancement

Comments

@gusye1234
Copy link

gusye1234 commented Dec 24, 2023

Hi there. Greate project.
Can we add a default language setting? I want to use Markdown as the auto language every time I create a block.

@heyman
Copy link
Owner

heyman commented Dec 24, 2023

Yes, this sounds like a good idea. You should also be able to choose if new blocks should have auto detection turned on or off.

@heyman heyman added the enhancement New feature or enhancement label Dec 24, 2023
@heyman heyman changed the title Request: default language setting Default language setting Dec 24, 2023
@gusye1234
Copy link
Author

Yeah, auto detection features seems a little bit weird that is not detecting on the fly. I think the user have to use the split command to split some contents when create a block so that the auto detection can work correctly? Otherwise it's always plain text.

@heyman
Copy link
Owner

heyman commented Dec 28, 2023

Auto-detection is detecting on the fly, but for performance reasons, it's not done on every single keystroke. Instead, the auto-detection only runs when a significant portion of the block has changed. That is when the Levenshtein distance between the last check and the new content is greater than 10% of the length of the block content.

@henhuy
Copy link

henhuy commented Mar 14, 2024

Otherwise it's always plain text.

For me it is the same. Tested to start a block writing markdown, but after ten lines of markdown text, language is still Plain Text (auto).
Maybe detecting markdown is corrupted?

@tinylearnings
Copy link

Same here - no matter the number of lines of markdown in a block. When splitting to a new block it's back to plain text. Being able to state a default language would be great. Then without such a default then current behavior can persist.

Many thanks for this great software.

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

Successfully merging a pull request may close this issue.

4 participants