GoLang在Vim中突出显示不起作用

I've seen multiple places(including here) that to add syntax highlighting you have to add certain lines to the .vimrc:

"Stuff for GoLang"
filetype off
filetype plugin indent off
set runtimepath+=$GOROOT/misc/vim
filetype plugin indent on
syntax on

That is what's currently in my .vimrc
Restarted vim, terminal, system, and still no highlighting. Any suggestions?

Okay guys, I go the answer:

$GOROOT needs to be defined or you can simply put the location of your go installation.

Ensure that the corresponding runtime files are actually there.

  1. $GOROOT must be defined; check with :echo $GOROOT
  2. There must a syntax plugin (syntax/go.vim) below $GOROOT/misc/vim. Check with :echo filereadable($GOROOT . '/misc/vim/syntax/go.vim').
  3. After opening a Go file, you can check again via :scriptnames and :syntax list.