snippet code formatter event listeners