Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Java
  3. Question
Java

Why does the vim java syntax only run on the first java buffer?

Asked by Maria Hodges Oct 11, 2022 1.1K views 1 answer
Share

About this question

 I'm using neovim v0.4.4, vim-plug, and uiiaoo/java-syntax.vim.

For some unknown reason(s), syntax highlighting from java-syntax only works on the 1st java buffer. For example:

$ nvim file1.java :e file2.java

$ nvim notJava.txt :vs file1.java :sp file2.java

In both cases, only file1.java has syntax highlighting from java-syntax, while file2 doesn't.

My init.vim

filetype on filetype plugin on syntax on " In vim-plug Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'uiiaoo/java-syntax.vim', {'for': 'java'} " For coc.vim let g:coc_global_extensions = [ 'coc-java', 'coc-highlight', ]

I don't see anything here that would interfere with java-syntax. What might be the cause for only the first Java buffer getting the syntax highlighting?

Your answer

1 Answer

More Java discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Java Blogs

Guides, tips and career advice on Java from JanBask experts.