Closed Rizhiy closed 4 years ago
No, You have to create a autocmd yourself.
autocmd BufWritePre *.py :CocCommand python.sortImports
every time i save the file, it show the message:
[coc.nvim] changed 1 buffers, use :wa to save changes to disk or :copen to open quickfix list
i need to save it another time to take effect. can i make it auto save changes to disk?
i need to save it another time to take effect.
Hm, it should not. My advice is never use it on save, it has side effect and could change all your buffers.
@chemzqm sorting imports doesn't have side effects, right? only organizing i.e removing unused imports would
Is there an option to sort imports on save, similar to format on save? If not, would be nice to add it.