coc-python
coc-python copied to clipboard
CocRestart is required for 'format' action to work properly
Invoking CocAction('format') results in following error:
2020-08-07T14:59:05.078 ERROR (pid:21408) [attach] - Notification error: format [] TypeError: Cannot read property 'fsPath' of null
at AutoPep8Formatter.provideDocumentFormattingEdits ( \AppData\Local\coc\extensions\node_modules\coc-python\lib\index.js:123320:49)
at AutoPep8Formatter.formatDocument ( \AppData\Local\coc\extensions\node_modules\coc-python\lib\index.js:123266:31)
at PythonFormattingEditProvider.provideDocumentRangeFormattingEdits ( \AppData\Local\coc\extensions\node_modules\coc-python\lib\index.js:123201:55)
at PythonFormattingEditProvider.provideDocumentFormattingEdits ( \AppData\Local\coc\extensions\node_modules\coc-python\lib\index.js:123181:21)
at FormatManager.provideDocumentFormattingEdits ( \.vim\plugged\coc.nvim\build\index.js:55661:47)
at Languages.provideDocumentFormattingEdits ( \.vim\plugged\coc.nvim\build\index.js:54609:41)
at \.vim\plugged\coc.nvim\build\index.js:54375:32
at new Promise (<anonymous>)
at Languages.descriptor.value ( \.vim\plugged\coc.nvim\build\index.js:54367:16)
at Handler.documentFormatting ( \.vim\plugged\coc.nvim\build\index.js:72636:51)
After invoking CocRestart everything works properly.
New info: after opening a new buffer problem occurs again.