Recent versions of Vim source a script at startup when you don't have a vimrc
so that new or casual users get a slightly richer out-of-the-box experience. This is a laudable idea on paper but it broke a lot of things and caused the very issue you are having for a lot of people.
Case in point, filetype-specific plugins like vim-go rely on filetype detection being enabled. This is done by the script I mentioned above but you are on your own when you decide to create your own vimrc
: the script in question is not sourced, so filetype detection is disabled by default, so filetype-specific plugins like vim-go don't work.
You can handle the situation in two ways:
source that script from your vimrc
, as mentioned in :help defaults.vim
:
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
take full control of your config by adding what you need to your vimrc
, as you need it:
filetype plugin indent on
I would go with the second solution.