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

Improve handling of compiler directives and attributes #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

idbrii
Copy link

@idbrii idbrii commented Nov 21, 2018

Support zero-column compiler directives.

Handle attributes followed by compiler directives.

I've also made a PR for these changes to nickspoons/vim-cs. I'll push future fixes there, since the maintainer is more active.

Compiler directives should go to the first column if that's what the
user configured.

Fixes directive when it follows an attribute line:

            [SerializeField]
    #if UNITY_EDITOR
            public
    #endif
                string m_PrettyName = "";

However, content inside directive (public) is still indented
incorrectly.
Prefer function names over comments.

Easier to remove the s: off of these and interactively do:
    echo IsAttributeLine(getcurpos()[1])
Now content inside directive (public) is indented correctly (matches
attribute):

        [SerializeField]
    #if UNITY_EDITOR
        public
    #endif
            string m_PrettyName = "";
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.

1 participant