Skip to content

updated typescript with a diff to javascript indentation #98

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

Closed
wants to merge 1 commit into from

Conversation

CodeOneTwo
Copy link

The motivation behind this is the currently wrong indentation when there is a new line with a dot starting like

Promise()
.then()

should be more like:

Promise()
    .then()

it's discussed here in javascript: pangloss/vim-javascript#139 (comment)
inspired by the commit bounceme/vim-javascript@da43967
should be reviewed

@leafgarland
Copy link
Owner

Hi @CodeOneTwo, many thanks for the PR.

I have had very little input into the indentation code and I don't have time right now to catch up enough to properly review your PR. Perhaps you would like commit rights to this repo, and you could commit it yourself?

@CodeOneTwo
Copy link
Author

Hey... Sounds great. I will put a little more effort into testing my code then. I will use it in the next few weeks and see if there's anything missing / not working.

@leafgarland
Copy link
Owner

Great, let me know when you are ready and I'll sort it out.

@JuanLucha
Copy link

Guys, this is really needed. It could be awesome if this can be review and merged.

@leafgarland
Copy link
Owner

@RavenCrow thanks for the gentle reminder. I am looking at pulling in the latest indent file from https://github.com/pangloss/vim-javascript. As mentioned in #105, their latest indent script does not automatically indent in the situations you mention but can be enabled by adding 0. to 'indentkeys' (see vim help). I think this is a good option, as there are people who prefer not to indent chained methods calls.

@leafgarland
Copy link
Owner

This PR is replaced by #107.

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