coc-extensions / coc-powershell

PowerShellEditorService integration for coc.vim
MIT License
58 stars 9 forks source link

^M at the end of lines when formatting with coc-nvim #120

Open jmwatte opened 3 years ago

jmwatte commented 3 years ago

System Details

Issue Description

I am experiencing a problem with... formatting ps1 files

xmap <leader>f <Plug>(coc-format-selected) nmap <leader>f <Plug>(coc-format-selected) formats the selected file but results in ^M at the end of every line. I have a .editconfig file and tested it with opening and loading files with all 3 possible lineendings. Checked the line endings. But no matter what I get the ^M after formatting

Expected Behaviour

Formatted without the ^M

-- Description of what should be happening --

Actual Behaviour

-- Description of what actually happens --

corbob commented 2 years ago

@jmwatte I'm unable to reproduce this on NeoVim 0.5.1 and PowerShell 7.1.5. Could you confirm if this is still an issue? The formatting is performed by PowerShell Editor Services so it's possible that this was an issue there that is no longer present.