mattn / efm-langserver

General purpose Language Server
MIT License
1.34k stars 61 forks source link

Blank line using yapf for python formatting #188

Closed RMTT closed 2 years ago

RMTT commented 2 years ago

Using efm with nvim built-in lsp:

require'lspconfig'.efm.setup {
    init_options = {documentFormatting = true},
    settings = {
        rootMarkers = {'.git'},
        languages = {
            lua = {{formatCommand = 'lua-format -i', formatStdin = true}},
            python = {{formatCommand = 'yapf', formatStdin = true}}
        }
    }
}

When i format such a main.py:

1. print(1,                           2)

The result is abnormal:

1. 
2. print(1, 2)

But it's ok when using yapf from terminal:

> yapf main.py
print(1, 2)
gjeusel commented 2 years ago

Duplicate of https://github.com/mattn/efm-langserver/issues/181