Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Question : how to format code ? #2137

Open
deb75 opened this issue Jan 8, 2021 · 1 comment
Open

Question : how to format code ? #2137

deb75 opened this issue Jan 8, 2021 · 1 comment
Labels
question A question about the LS

Comments

@deb75
Copy link

deb75 commented Jan 8, 2021

Hello,

Configuration :

  • OS : Windows 10
  • Microsoft Python Language Server version 0.5.59.0
  • python : winpython64 3.9.0
  • lsp client : emacs 27.1.2 lsp-python-ms

When typing C-c l = =, I receive the message :

lsp-format-buffer: Capability not supported by the language server: "documentFormattingProvider"

I searched within issues if anyone did report any formatting problem (keyword "format") but it returned nothing.

Does this returned message means the python-language-server lacks the formatting feature ? Or is it a bug, most probably from my configuration ?

If not, could it be feature request to add python code formatting ?

Regards

@deb75 deb75 added the question A question about the LS label Jan 8, 2021
@MikhailArkhipov
Copy link

LS does not format code. The reason is there are many excellent third party formatters with extended functionality and duplicating it does not make much sense. VS Code extension formats code using one of those.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question A question about the LS
Projects
None yet
Development

No branches or pull requests

2 participants