Syntax highlighting just stopped working on my mac (v 10.14.6). I've been trying to get it back over the past 2 days with no success. I have neovim (v 0.3.8) and when I use :syntax, the command line says:

No Syntax items defined for this buffer. 

Also, I am using iterm2.

Below is a snippet of my init.vim file:

:filetype plugin indent on  
:syntax on
set background=dark
colorscheme base16-snazzy
set termguicolors
  • What does :set ft? say? What does :filetype say? Please update the question with the results... – filbranden Sep 4 '19 at 21:28
  • Welcome to Vi and Vim! As filbranden says, it’s pretty hard for us to debug exactly what’s going on here. Does that snippet work if its the only content of your init.vim? – D. Ben Knoble Sep 5 '19 at 0:50
  • 1
    See also vi.stackexchange.com/q/2003/10604, and feel free to edit your Q – D. Ben Knoble Sep 5 '19 at 0:52
  • The result from :filetype is filetype detection:ON plugin:ON indent:ON, and the result from :set ft? is filetype= – P. Khoza Sep 5 '19 at 6:28
  • 4
    The second part (filetype=) is likely part of the problem... You normally need a filetype set to have syntax highlighting. What kind of file are you editing, when you're having problem with syntax? What kind of filename pattern/extension on the file? – filbranden Sep 5 '19 at 11:05