-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature Request: Scrollable CodeBloacks #5
Comments
Do you have line wrap enabled under options > editor? Disabling line wrapping from settings restored horizontal scrolling on my end. Let me look at using css to disable it only for codeblocks. Does this look like what you’re after? https://forum.obsidian.md/t/disable-word-wrap-for-code-blocks/13210/16 |
@xidsyed I've spent some time playing around with this and can't seem to get it working. I've looked at some popular themes to get ideas and have not found a solution there either. I think part of the issue is in how codemirror renders codeblocks. I can get to where individual lines will scroll horizontally, but moving the entire block with them has been out of reach. (I think I found a way to get full horizontal scrolling of codeblocks in Obsidian's reading mode, but that's it.) I will keep my eye out for ways around this and add a toggle for it in Style Settings if I come across anything that works. In the meantime, your best bet might be to disable linewrapping and/or readable line lengths in Obsidian's settings and then use a css snippet for a width you'd prefer. Sorry I don't have better news! |
Yeah. Super annoying to have code wrapped into a little block. Makes sense, I was able to do it without the livePreview. Let's Hope they come up with a fix for this soon. |
Could you please add support for codeblocks to be scrollable. I am tired of the word wrap i have to deal with. been searching for a way to do it myself, no luck ☹. Everyonwe who codes can tell you that the default codeblock width isnt enough.. And wrapping code makes it look like a horrible mess :(
Great work on the theme btw. Super clean and aesthetic. Just needs a little polish.
The text was updated successfully, but these errors were encountered: