-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提供选中区域格式化的功能 #916
Comments
我看了看 LSP 的协议 https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions 目前 LSP 协议还不支持指定区域格式化, 因为格式化的调整有可能会调整换行的情况, 目前也没法通过对比LSP Server返回的信息, 在Elisp端精确控制格式化区域。 |
Range Format 协议已经支持 请更新测试, 有任何问题欢迎反馈。 |
我用的后端是clangd 18.1,选中区域执行 lsp-bridge-code-format,报错 |
那就是clangd lsp server不支持局部格式化这个功能 |
lsp-mode可以支持区域格式化,能否帮忙确认下? 谢谢 |
…eFormattingProvider/rangesSupport, some LSP server's range format depend on documentRangeFormattingProvider.
我推送了 dd70010 这是补丁解决不同LSP Server range format返回格式不一致的问题, pyright/ruff 返回的是 documentRangeFormattingProvider/rangesSupport, clangd 返回的是 documentRangeFormattingProvider |
太好了,现在正常工作了 |
能否提供一个支持选中区域格式化的功能,目前只找到lsp-bridge-code-format,会对整个文件格式化,局部格式化一是更快,二是有时候不想改动其他位置的格式,以免代码差异过多,不便查看修改记录
The text was updated successfully, but these errors were encountered: