emacs-lsp / lsp-pyright

lsp-mode :heart: pyright
https://emacs-lsp.github.io/lsp-pyright
GNU General Public License v3.0
284 stars 24 forks source link

How to turn on foldingRange #77

Closed shiyuangu closed 2 years ago

shiyuangu commented 2 years ago

Hi all, Does lsp-pyright support "testDocument/foldingRange"? If so, do we need specific config to turn it on? I got an error of "The connected server(s) does not support method textDocument/foldingRange" when I call (lsp--get-nested-folding-ranges). I am using the latest pyright 1.1.264. Thanks!

shiyuangu commented 2 years ago

Looks like foldingRange is not supported in pyright: https://github.com/microsoft/pyright/issues/1037. Pylance just added this feature. Unfortunately. Pylance license doesn't allow it to use beyond ms products.