My neovim doesn't load file type plugins when loading a ruby/eruby file. Here is the corresponding configuration files:
for f in ~/.config/nvim/after/ftplugin/* ; do echo "# $f" ; cat $f; done
# /home/psychoslave/.config/nvim/after/ftplugin/erb.vim
" Turn off vi compatibility
set nocompatible
set smartindent
set noautoindent
set filetype=ruby
filetype indent off
filetype plugin indent on
set shiftwidth=2
set tabstop=2
set expandtab
"set ai "Auto indent
"set si "Smart indent
"set wrap "Wrap line
set backspace=indent,eol,start
set filetype=eruby
# /home/psychoslave/.config/nvim/after/ftplugin/eruby.vim
" Turn off vi compatibility
set nocompatible
set smartindent
set noautoindent
set filetype=ruby
filetype indent off
filetype plugin indent on
set shiftwidth=2
set tabstop=2
set expandtab
"set ai "Auto indent
"set si "Smart indent
"set wrap "Wrap line
set backspace=indent,eol,start
set filetype=eruby
# /home/psychoslave/.config/nvim/after/ftplugin/ruby.vim
" Turn off vi compatibility
set nocompatible
set smartindent
set noautoindent
set filetype=ruby
filetype indent off
filetype plugin indent on
set shiftwidth=2
set tabstop=2
set expandtab
"set ai "Auto indent
"set si "Smart indent
"set wrap "Wrap line
set backspace=indent,eol,start
But when I open a ruby file, it doesn't have tab set to 2 spaces and so on.
I did added filetype plugin indent on
in ~/.config/nvim/init.vim
.
Once running, trying to launch :so ~/.config/nvim/after/ftplugin/eruby.vim
will lead to the following error, repeated multiple times:
line 6:
E218: autocommand nesting too deep
Error detected while processing FileType Auto commands for "*":
E218: autocommand nesting too deep
How can I resolve this problem? Is there a way to list what configuration files a neovim red and in which order?
runtimepath=~/.config/nvim,~/.config/nvim/pack/plugins/start/vim-vue,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/flatpak/ex ports/share/nvim/site,/var/lib/flatpak/exports/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/share/nvim/runtime, /usr/share/nvim/site/after,/usr/local/share/nvim/site/after,/var/lib/flatpak/exports/share/nvim/site/after,~/.local/share/flatpak/expor ts/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after
ftplugin/ruby.vim
file:checkhealth
with Nvim 0.2.2 or later. It looks for problems with $VIMRUNTIME.