Fork me on GitHub

I’ve just started using and Neovim is doing some weird things with indentation when I edit build.clj

(ns build)

(defn hello
        (println "Hello, world!")) 
The filetype shows as clojure and indentation works fine on other Clojure files under src in the same project. Does anyone have an idea of what could be going wrong here?


Very weird, it’s something about the file itself. If I copy one of my existing (properly indenting) source files over to build.clj in the project root the indentation works properly. So everything is working fine for me now, but I’m still curious how a file could get into such a state.


That indentation definitely looks very funky. :thinking_face: Is it possible that there are tabs in the file? There is probably a better way to check than this, but what I usually do is use this plugin's ga binding to inspect each "space" to see if it's a space or a tab.


I had a look at the bytes with xxd. Everything looks normal: no tabs, no byte-order marks… I’ll keep playing with it and post an update if I figure it out.