I believe your problem is not related to the Octave syntax file. It only introduces syntax coloring properties.
I believe the problem comes with the lines that associate the octave file type to the buffers corresponding to the
au! BufRead,BufNewFile *.m,*.oct set filetype=octave
*.m files are associated to the
matlab file type and come with the
With the new lines the octave indentation is reset to your Neovim default indentation.
You can restore it to the
matlab indentation with the following lines into your
au! BufRead,BufNewFile *.m,*.oct setlocal indentexpr=GetMatlabIndent()
Or by adding an
octave.vim file into
~/.config/nvim/ftplugin/ with the following content:
But maybe should we search for a more Octave specific auto-indentation.
Maybe could you consider installing the following plugin octave that bring both colorization and Octave specific auto-indentation?
init.vimto get Octave coloring, restart Neovim and give us the result of the following commands
?in my command. The consequence is that you set the option (and then it returns itself). Could you restart Neovim and repeat the commands with the trailing
?included? I'm already 99% convince that you had matlab auto-indentation that is indeed relatively good for Octave although probably not 100% perfect.