diff options
Diffstat (limited to 'vim/.vimrc')
| -rw-r--r-- | vim/.vimrc | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -126,21 +126,5 @@ function! s:lsp_keymaps() abort endif endfunction augroup END -function! s:prettier_format() abort - if !executable('prettier') - return - endif - let l:view = winsaveview() - silent %!prettier --stdin-filepath % --html-whitespace-sensitivity=strict - if v:shell_error - silent undo - echohl ErrorMsg | echom 'formatting failed' - endif - call winrestview(l:view) -endfunction -augroup prettierformat - au! - autocmd BufWritePre *.html,*.css call s:prettier_format() -augroup END |
