I am trying to use Vim for some Groovy code at work. Apparently, it does not cope with auto-indicators when semicolons are not used. I found several Ruby and JavaScript related issues with the same problems, but none of the fixes that I find work for me. I have a filetype plugin indent on in my .vimrc and do not install cindent , autoindent or smartindent . I tried to run setlocal nocindent nosmartindent in the Groovy buffer and re-specify the file with ggVG= in case the plugin installs it behind the scenes and it always fails anyway.
For example, I get this in a small sample (from the personal libGDX sandbox application that I write in Groovy)
@Override void render () { Gdx.gl.glClearColor(0.75f, 0.75f, 0.75f, 1) Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT) batch.begin() batch.draw(img, 0, 0) font.draw(batch, "Testing", 300, 400) batch.end() }
Note the extra indentation after the annotation, opening brackets, and the first line of the function. My .vimrc is pretty complicated, but I can post a link to my dotfiles if anyone thinks this helps.
source share