Reputation: 63062
I have added a scala syntax file from https://github.com/derekwyatt/vim-scala/blob/master/syntax/scala.vim as ~/.vim/syntax/scala.vim
to an ubuntu system
$ ll ~/.vim/syntax/scala.vim
-rw-rw-r-- 1 steve steve 11202 Dec 11 07:48 /home/steve/.vim/syntax/scala.vim
But vim MyFile.scala
is still vanilla white - no syntax applied. Any hints here?
Upvotes: 0
Views: 151
Reputation: 27822
You'll need to tell Vim to apply this syntax file for Scala files.
ftdetect/scala.vim
contains the logic for detecting whether this file is a Scale file, and will set the filetype
accordingly. This will also set the syntax
setting. If you add this file, things should work.
In addition to that, you'll almost certainly also want:
ftplugin/scala.vim
– this sets various settings that make sense for Scala development.
indent/scala.vim
– contains the logic for indenting.
These four files account for the bulk of the plugin, so you might as well get the entire thing. If you want to downsize things, then removing some files is usually easier than cherry-picking files until it works.
Upvotes: 1