coc-powershell
coc-powershell copied to clipboard
^M at the end of lines when formatting with coc-nvim
System Details
- Vim or NeoVim?:NeoVim
-
Version of Vim (run
vim --version
) or NeoVim (runnvim --version
):0.4.4 -
Version of
coc-powershell
(in Vim or NeoVim::CocList extensions coc-powershell
):0.1.14 - Operating System:windows 10
-
PowerShell version (in PowerShell:
$PSVersionTable
):7.1.1
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 --
@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.