0

I have been mainly using vim to code in Java and everything works great. Recently I've tried to code in JavaScript however vim appears to be having some issues. It is because of the prettier plugin which I have recently included (java works well though). I attempted to write a simple JavaScript Hello World program just to test if things are working. However, every time I attempt to save in a file ending with .js extension an error appears at the bottom left of my vim page. The error looks like this.

this

After I press enter or some other command it changes everything I typed in the file to this.

this

Edit: I also tried it out on a Python file and there was no issue with Prettier.

I use Vundle as a plugin manager, I have included this in my .vimrc:

Plugin 'prettier/vim-prettier', { 'do': 'yarn install' }

I'm wondering if there is a way to fix this. I already tried reinstalling the plugin, I even tried downgrading the version. Nothing seems to work. Has anyone bumped into this before? If so, how did you guys tackle the issue?

Ajanyan Pradeep
  • 1,097
  • 1
  • 16
  • 26
  • FYI, there's another question related to your issue on SO here: https://stackoverflow.com/questions/60105065/how-to-get-prettier-working-with-js-files-in-vim – adrian7 May 18 '20 at 13:48
  • Does this answer your question? [How to get Prettier working with js files in vim?](https://stackoverflow.com/questions/60105065/how-to-get-prettier-working-with-js-files-in-vim) – Pantani May 18 '20 at 13:58
  • Thanks for the reference, I followed the steps as mentioned in the link, and tried saving on a .js file. Nothing changed, the output is the same. – The_Frantic_Coder May 18 '20 at 14:34

0 Answers0