I know this is hard, but is it possible to detect if the line is a const
or let
, when I type the comma at the end of the line, it will go to the next line and indent.
For example, assume below is the first line:
const test = document.querySelector('#id')
Now as I type a comma at the end like this:
const test = document.querySelector('#id'),
The expected result is:
const test = document.querySelector('#id'),
///Cursor should be at here, note now it's at new line and also indent.