Sorry for misunderstanding your question. The first thing we did after installing the prettier extension is to check the checkbox for format on save so that's the main thing we need to do only once for your editor.
All other options will only work if that checkbox is checked and to automatically add semicolon on save, either you need to add the option semi: true in .prettierrc or check the checkbox to add semicolon in prettier settings
You add all the snippets you want on separate line as I have shown in the gif in the article and finally when you save the file, semicolons will be added automatically.
I have also updated the article just now, for the steps to enable the semicolons under "Automatically add a semicolon at the end of the line" section
Sorry for misunderstanding your question. The first thing we did after installing the prettier extension is to check the checkbox for format on save so that's the main thing we need to do only once for your editor.
All other options will only work if that checkbox is checked and to automatically add semicolon on save, either you need to add the option
semi: true
in.prettierrc
or check the checkbox to add semicolon in prettier settingsYeah it is working after saving a file. But what I wanted is to add semicolon just immediately after using snippets.
You add all the snippets you want on separate line as I have shown in the gif in the article and finally when you save the file, semicolons will be added automatically.
I have also updated the article just now, for the steps to enable the semicolons under "Automatically add a semicolon at the end of the line" section
I mean, I want to add semicolon before saving the file.
The snippets extension does not add the semicolon automatically so you need to save the file to add the semicolons
Yeah, looks like that is the only possible way. Thanks for your sincere replies.