Use tpope/vim-sleuth to set indentation in vim