Skip to content

The tab size of the code block does not meet expectations. #649

Closed

Description

@ijustyce

My code is as follows

func sayHelloStream() {
	conn, _ := createConn()
	if conn == nil {
		return
	}
}

And the screenshot of IntelliJ IDEA is as follows

Image

Maybe I just want to set the tab size to 2 instead of 4. Is it possible in the future?

Activity

  1. morrolinux commented on Jan 25, 2025

    @morrolinux

    This is of particular relevance considering that code blocks have "reflow"/wrap-around always enabled without an option to disable it and just scroll horizontally for large code snippets.

  2. ijustyce commented on Feb 5, 2025

    @ijustyce
    Author

    This is of particular relevance considering that code blocks have "reflow"/wrap-around always enabled without an option to disable it and just scroll horizontally for large code snippets.

    Add tab-size to css is enough.

    .ProseMirror pre code {
        color: inherit;
        padding: 0;
        background: none;
        font-size: var(--mantine-font-size-sm);
        tab-size: 4;
        -moz-tab-size: 4;
        -o-tab-size: 4;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions