udalov / kotlin-vim

Kotlin plugin for Vim. Featuring: syntax highlighting, basic indentation, Syntastic support
Apache License 2.0
630 stars 52 forks source link

Syntax highlighting doesn't work with Vundle #13

Open ishankhare07 opened 6 years ago

ishankhare07 commented 6 years ago

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.

udalov commented 6 years ago

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?

ishankhare07 commented 6 years ago

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

ClaudeXin commented 6 years ago

I have this problem too.

TimBritton commented 6 years ago

After typing :syntax on the syntax highlighting is working.

TamasBarta commented 6 years ago

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

TamasBarta commented 6 years ago

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

sarevok-anchev commented 5 years ago

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.

jcw1993 commented 5 years ago

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

it works for me.

panda8z commented 5 years ago

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

wilsoniya commented 5 years ago

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:

bravestarr commented 4 years ago

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