groenewege/vim-less

Nested '}' auto indent wrong

andyyou opened this issue · 5 comments

x {
  table {
   color: red;
}  /* here always wrong indent */
}

I'm running into something similar when using '&'

before auto-indent

.movie-search-results {
    .movie-row {
        td {
            &.admin {
                min-width: 17rem;
            }
        }
    }
}

after

.movie-search-results {
    .movie-row {
        td {
            &.admin {
                min-width: 17rem;
        }
    }
}
}

haha but no one fix it?

This works as expected for me, I am unable to reproduce the issues as you described.

Just a note, Less plugin leverages css indent plugin, so if this is happening for you, it might be a css indent plugin issue. Since it works fine for me, updating your vim (which will update the plugins shipped with vim) should fix this for you, if not then perhaps some other css plugin is messing something up.