kotlin-vim icon indicating copy to clipboard operation
kotlin-vim copied to clipboard

Syntax highlighting doesn't work with Vundle

Open ishankhare07 opened this issue 7 years ago • 11 comments
trafficstars

I've installed the plugin using Vundle Plugin 'udalov/kotlin-vim'

Then I've made sure to run PluginInstall. Everything went fine and I've restarted the editor several times. But I get not syntax highlighting at all.

ishankhare07 avatar Feb 15 '18 23:02 ishankhare07

I'm not familiar with Vundle to confirm or deny if this is a problem. Do you have any other plugins installed by Vundle? Do they work?

udalov avatar Feb 16 '18 12:02 udalov

I have a working setup of Vundle in my vim configuration. Have about 20+ plugins setup through Vundle in properly working condition. So I can confirm that I doesn't have anything to do with my vim/Vundle configuration. There are instructions for installing this plugin through Vundle in the README as well

ishankhare07 avatar Feb 25 '18 09:02 ishankhare07

I have this problem too.

ClaudeXin avatar Mar 09 '18 19:03 ClaudeXin

After typing :syntax on the syntax highlighting is working.

TimBritton avatar Apr 20 '18 18:04 TimBritton

Typing :syntax on doesn't help in my case. (I tried it, but it's already present in .vimrc)

TamasBarta avatar May 18 '18 14:05 TamasBarta

Not sure how Vundle comes in, but :set filetype=kotlin helps, so probably it's a problem with file type detection.

TamasBarta avatar May 18 '18 20:05 TamasBarta

Same problem here, it's as if the ftdetect/kotlin.vim file is not being read.

copying the contents of that file to ~/.vimrc makes things work as expected.

Not sure why ftdetect/kotlin.vim is not being read - if you look at for instance rust.vim (another plugin but for rust that also sets the filetype) it does essentially the same thing, and that works.

I doubt it's related to the installation method.

sarevok-anchev avatar Dec 15 '18 23:12 sarevok-anchev

add this to your .vimrc: au BufNewFile,BufRead *.kt set filetype=kotlin

it works for me.

jcw1993 avatar Dec 30 '18 11:12 jcw1993

Not sure how Vundle comes in, but :set filetype=kotlin helps, so probably it's a problem with file type detection.

add syntax on " highligthing in your .vimrc file may work

panda8z avatar Jul 31 '19 10:07 panda8z

I was having this issue as well. I double checked my ~/.vimrc and I had a configuration mistake for vundle. The last two lines of the Vundle setup need to be swapped:

Before:

" ...

filetype plugin indent on                   " vundle required!
call vundle#end()                           " required

After:

" ...

call vundle#end()                           " required
filetype plugin indent on                   " vundle required!

Kinda weird bc afaict nothing else was broken :man_shrugging:

wilsoniya avatar Sep 19 '19 15:09 wilsoniya

Referring to the help of vundle, you should put filetype off before vundle specific configuration, but you may miss that command.

bravestarr avatar Oct 11 '19 04:10 bravestarr