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

WIP: Indent mode #122

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

Conversation

dmytrokyrychuk
Copy link

Issue #120

This makes it possible to apply different settings to the leading stars
(e.g., make them invisible).
@dmytrokyrychuk
Copy link
Author

This makes it possible to make leading starts in headers invisible by adding the following vscode settings:

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.type.org.leading",
                "settings": {
                    "foreground": "#00000000"
                }
            },
            {
                "scope": "entity.name.function.org.leading",
                "settings": {
                    "foreground": "#00000000"
                }
            },
            {
                "scope": "entity.other.attribute-name.org.leading",
                "settings": {
                    "foreground": "#00000000"
                }
            },
        ]
    }

I am not sure if there is a cleaner way to achieve this.

I am not sure how to handle the indentation yet.

@rbenson
Copy link

rbenson commented Dec 3, 2018

I see you wrote a scope, which I assume applies if there's 2+ asterisks at the start of a line, so *** would mark it .leading .leading .headline if reviewing with TM Scopes. If so, add a new setting called cleanView, if true, can't you say .leading == editor.background?

@dmytrokyrychuk
Copy link
Author

I don't know if there is a clean way to implement this. There is no one editor.background color we could use because there could be a picture on the background, and probably gradient too. We want .leading foreground color to be transparent. It looks like there is no easy way to achieve that without support from themes (theme authors must know to include leading.foreground: #00000000 for org language). Alternative is to patch editor.tokenColorCustomizations array at runtime, which will be difficult to do reliably.

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.

None yet

2 participants