Skip to content

Automatic syntax highlighting with .rs files does not work #306

@yeonsookimdev

Description

@yeonsookimdev

rust.vim version:
commit 12f549f

Steps to reproduce:

On CentOS 7, install vim 7.4

# yum install vim-enhance vim-common

Then, install rust.vim using vim-plug

$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://github.com/raw/junegunn/vim-plug/master/plug.vim

~/.vimrc file:

call plug#begin('~/.vim/plugged')
Plug 'rust-lang/rust.vim', { 'tag' : '12f549f9e4939bca53c8a87e6921a36fb143af9a' }
call plug#end()

After saved ~/.vimrc, run :PlugInstall in vim or $ vim +PlugInstall +qall on terminal.

Expected vs. actual behavior:

  • Expected:
    When I opened rust source file with .rs extension, for example main.rs, then vim automatically highlights Rust syntax.
    (And this is the actual behavior until commit 329fa78.)
    image

  • Actual:
    With commit 12f549f, vim automatically highlights syntax but it is not for Rust.
    image
    When I run :set syntax=rust manually, then Rust syntax highlight works.

I cannot get additional debug information because :RustInfo failed with E492 error.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions