-
Notifications
You must be signed in to change notification settings - Fork 352
Indentation no longer working #1003
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
Comments
my results:
your vim setup is the problem somehow |
Hard to believe, but the problem was this statement from the mxw/vim-jsx repository: |
that's good to hear. now i wonder about the other people with that setting on |
mxw/vim-jsx#130 i actually had a patch to detect automatically. it works great for me |
And I see that it works fine for other folks, so it is strange. I reduced my .vimrc to this minimal version for isolating this: set nocompatible
call plug#begin('~/.vim/bundle')
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rvm'
Plug 'tpope/vim-surround'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-session'
call plug#end()
"""""""""""""""""""" Some plugin overrides """""""""""""""""""""""
" let g:jsx_ext_required = 0 As soon as I uncomment that one statement, the indenting falls apart. |
remove set compatible; add |
Still broken; previous was 'set nocompatible', 'set compatible' or nothing still don't work. |
all that says is you have something in you config, or .vim/ that should be removed. the behaviour of indentexpr and after/indent/ folders are consistent from vim 7.00001 and there is nothing unconventional in this repo |
Am I missing something here orrr... That variable is basically saying whether Try the following: Open the file (with that comment disabled), then do |
I know; the whole thing is crazy and that line should have nothing to do with this. I tested it on one machine the other day (Sierra) and that was the case. Now I'm testing on my personal machine (El Cap) and indentation is not working with that statement enabled or disabled. And that shouldn't have anything to do with it either. I'm working with that minimal .vimrc that I posted above. Occasionally I see good indentation; usually I do not. When the indentation fails, the JSX sections work fine, and fat-arrow functions indent as well. It's driving me batty, so I'll keep trying to find something that's reproducible. I can't imagine what's in that tiny .vimrc that is causing the problem. Anyway, thanks for the suggestions... |
OK; please pass me my serving of humble pie... The problem was, as you said @bounceme , in my .vim/ and not in my .vimrc file : the perp was Thanks again for the support. |
Glad you got it sorted! |
I hate to bring this up again, but I've been experiencing the same issues, and I narrowed it down to just the |
sorry to bring this up again. For simple demo codes like https://github.com/mui-org/material-ui#usage, indent is not correct for Button element.
I have these vim plugin and setting. Also update to the latest codes.
Note that if Your help is highly appreciated. |
I have a similar issue -- if I remove |
Recently (last few weeks), JavaScript indenting no longer works - numerous sections of code get outdented too far, but some still work.
I'm writing ES6 code and using only vim-javascript and vim-jsx.
(The 'for' clauses are new today; an unsuccessful attempt to solve the problem)
Here's a screenshot of the output; code text follows.

Here's the code:
The text was updated successfully, but these errors were encountered: