Skip to content

Move the indentation rules to autoload functions #217

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

Merged
merged 1 commit into from
Nov 1, 2016

Conversation

kassio
Copy link
Member

@kassio kassio commented Nov 1, 2016

The main reason of this is try to simplify the rules definition.

  • Simplify the indent/elixir.vim moving all the indentation rules to
    autoload/indent.vim. The indent script is responsible now for call the
    rules, not define them.
  • Rename GetElixirIndent to elixir#indent.
  • Use constants with SCREAM_CASE.
  • Each rule function now receives the current indentation and a line
    dictionary, which contains the current and last lines number and texts.

@jbodah can you gimme your 2 cents here?

- Simplify the `indent/elixir.vim` moving all the indentation rules to
`autoload/indent.vim`. The indent script is responsible now for call the
rules, not define them.
- Rename `GetElixirIndent` to `elixir#indent`.
- Use constants with SCREAM_CASE.
- Each rule function now receives the current indentation and a line
dictionary, which contains the current and last lines number and texts.
@jbodah
Copy link
Collaborator

jbodah commented Nov 1, 2016

No strong opinion from me either way. Looks cleaner 👍

@kassio kassio merged commit 9afaff4 into master Nov 1, 2016
@kassio kassio deleted the move-each-indent-rule-to-its-own-file branch November 1, 2016 11:53
@sumerman
Copy link

Breaks (disables) indentation completely when is used with Vundle master.

@kassio
Copy link
Member Author

kassio commented Nov 14, 2016

@sumerman can you create an issue please?

@sumerman
Copy link

@kassio I was unsuccessfully trying to create a minimal example. It turns out the problem was present only in one stored session. Therefore it's not an actual issue. My apologies.

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.

3 participants