othree / yajs.vim

YAJS.vim: Yet Another JavaScript Syntax for Vim
http://www.vim.org/scripts/script.php?script_id=4974
Vim License
688 stars 41 forks source link

Highlighting failure with vim-vue #165

Open avral opened 6 years ago

avral commented 6 years ago

I'm use this configs: Plug 'othree/yajs.vim' Plug 'othree/javascript-libraries-syntax.vim' Plug 'othree/es.next.syntax.vim' Plug 'posva/vim-vue'

autocmd BufRead,BufNewFile *.vue setlocal filetype=vue.html.javascript.css

when im add javascript filetype for *.vue fiels i see this failure:

screen shot 2018-04-30 at 16 25 36

but when i disable javascript setting, all is ok.. autocmd BufRead,BufNewFile *.vue setlocal filetype=vue.html.css

screen shot 2018-04-30 at 16 27 08

neovim v0.2.2

othree commented 6 years ago

I don't think javascript is necessary here. The problem is caused by the setting will let Vim load the built-in runtime Vim script files in different order. And the final result is the built-in have higher priority. And led to the syntax error.

avral commented 6 years ago

@othree, how can i fix this? Yes, maybe javascript is not necessary here, but without javascript autocomplete for js(tern) not working..

othree commented 6 years ago

Hi

I believe the htmlcomplete function will call javascriptcomplete#CompleteJS Maybe you can just overwrite it1