-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix indentation #152
base: master
Are you sure you want to change the base?
Fix indentation #152
Conversation
Hi, thanks for the very thorough write-up! I'm not going to get a chance to look at this for a day or two but will do as soon as I can. This is just a thought but given that the indent file here is a copy anyway - do you think it is worth keeping one in this repo - perhaps this repo should focus on the syntax? |
Any chance of getting this merged? Is it even up to date anymore? |
@thejohnfreeman you mentioned using prettier instead, does that mean you have no more interest in this PR? If you still do, let me know as I'm happy to open up the repo to others who have more time. |
You're right, I don't need this PR any more. You can close it or hand it off to someone else. |
Would be pretty nice to merge this in. |
@leafgarland what is blocking this PR? the indenting in TS is aweful and painful when writing code. @thejohnfreeman You don't use Vim for coding anymore? If you do use Vim how do you get indenting working? This is confusing to have a PR fix a problem many are having and yet no option to fix the problem. It seems you did fix the problem with something magical called prettier. How do we enable this option in Vim? |
@sukima Nothing blocking it but having the author not use it makes me less keen to bring in a big change that nobody is vested in. Does this PR improve things for you? |
I don’t know I didn’t try it. I might try it later. All I know is that indentation doesn’t work and I (like others) would like it to work. I am curious why you haven’t run into this same issue especially if dog-fooding is important. |
Hey I’ve been using Prettier for the last several weeks, and while I like it, it is definitely not a Vim indent solution. Its more like GNU indent where it gets run on a whole file modifying it. |
@sukima editing typescript is only a small part of my work currently and I have not had any issues with indenting. I am not in a position to dog-food this plugin anymore. If anyone who does edit lots of typescript in vim would like to try this PR and say that it works better, then I am happy to merge it. |
@leafgarland I spend most of my time either writing python or writing typescript (much of it in tsx) - I have definitely come to notice and struggle with the indenting in .tsx files. At your suggestion, I tried to use this PR, and it had only been a couple hours so far, but I had noticed a definite improvement. There were still a few oddities, but it seems to have handled a few of the egregious issues. Then I looked, and saw that I hadn't even installed the pull request branch properly in Vundle, and I was just getting the experience without any FWIW, I properly installed this pull request after my screw up, and noticed no improvement as far as indentation issues in For now I have decided to opt for the indentation disable setting: |
There are 3 commits (right now) in this review. The first two updated to the latest indent file from 'pangloss/vim-javascript', and the third switched gears to
HerringtonDarkholme/yats.vim
. There are a few open issues with "indent" in their name:HerringtonDarkholme/yats.vim
does the wrong thing in this case, which would be a regression if we adopted their indent file.)-- Comma-terminated member declarations within interface declarations. This is also a bug in
pangloss/vim-javascript
, but not inHerringtonDarkholme/yats.vim
.-- Enum declarations. This is a bug in all three projects.
HerringtonDarkholme/yats.vim
, which has a separatetsx.vim
indent file.I think TypeScript might be at the point that it deserves its own indent file, however, not one copied from JavaScript or Ruby. No one else is doing it, but I think this project, as the one chosen by
sheerun/vim-polyglot
for TypeScript, is the perfect candidate.