Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No syntax color for html files when vim-prettier is enabled #183

Closed
AdrienLemaire opened this issue Apr 15, 2019 · 5 comments
Closed

No syntax color for html files when vim-prettier is enabled #183

AdrienLemaire opened this issue Apr 15, 2019 · 5 comments

Comments

@AdrienLemaire
Copy link

AdrienLemaire commented Apr 15, 2019

Do you want to request a feature or report a bug?
Bug

What is the current/expected behavior?
file syntax coloration should behave independently from plugins like vim-prettier.

vim-prettier enabled

vim-prettier disabled

  • disabling the 3 lines is the only thing I changed in my vimrc.
  • Auto-selection of htmldjango filetype over html is done by plugin 'tweekmonster/django-plus.vim'
  • As you can see in the screenshot, html/htmldjango filetypes aren't evne listed in the vim-prettier Plug for list. Therefore I cannot run :PrettierVersion from that file

What version of vim-prettier are you using - (output of :PrettierVersion) ?
when run from a js file, I get 0.2.7

What version of prettier are you using - (output of :PrettierCliVersion) ?

node: error while loading shared libraries: libicui18n.so.63: cannot open shared object file: No such file or directory^@

⇒ Well, maybe that's the reason of the problem, although I'd love to understand the reason for the libicui18n library to break filetype selection when vim-prettier is on.

What is your prettier executable path - (output of :PrettierCliPath) ?
/home/dori/.vim/plugged/vim-prettier/node_modules/.bin/prettier

vimrc

Plug 'prettier/vim-prettier', {
           \ 'do': 'yarn install',
           \ 'for': ['javascript', 'typescript', 'typescript.tsx', 'json', 'yaml', 'markdown'] }  " JS
Plug 'tweekmonster/django-plus.vim', { 'for': ['python', 'htmldjango', 'html'] }
@AdrienLemaire
Copy link
Author

AdrienLemaire commented Apr 15, 2019

Tried a quickfix with

$ sudo ln -s /usr/lib/libicui18n.so /usr/lib/libicui18n.so.63
$ sudo ln -s /usr/lib/libicuuc.so /usr/lib/libicuuc.so.63

but it's getting uglier

:PrettierCliVersion
node: symbol lookup error: node: undefined symbol: _ZN6icu_638ByteSink15GetAppendBufferEiiPciPi^

Edit: found the reason. nodejs was listed in my pacman IgnorePkg (arch linux) and yarn couldn't work well with prettier. Reinstalled nodejs & prettier.

:PrettierCliVersion
1.17.0

But then, the initial issue still persists, still seeing django template files without syntax color and wrong html filetype

@AdrienLemaire
Copy link
Author

@junegunn @tweekmonster any idea why this is happening? How can I debug this?
Thanks for your help

@mitermayer
Copy link
Member

Do you mind testing to see if this issue still occurs on the release/1.x branch ? I will be doing a release soon and promoting it in favor of the legacy version.

To start using that release branch for now you can update your vimrc to point to it like:

Plug 'prettier/vim-prettier', {
  \ 'do': 'yarn install',
  \ 'branch': 'release/1.x'
}

@AdrienLemaire
Copy link
Author

@mitermayer sorry, I have never used vim-prettier in the end, and am not working on a js project at the moment. But I'll keep in mind that you release a new version for the next opportunity, thanks!

@mitermayer
Copy link
Member

Hi @Fandekasp,

Thanks for letting me know. Will close this issue :) feel free to re-open in the future if you still experience this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants