-
Notifications
You must be signed in to change notification settings - Fork 304
Add support for the "textDocument/formatting" verb #576
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
Comments
I don’t think we’ve got a bug report for this. It’s very related to #496. |
rdar://96159694 |
I think the |
@fwcd which version of Xcode does this correspond to? As of Xcode 13.4 (13F17a),
|
Yes, IIUC the provider is not registered since the request is yet to be implemented (WIP at #361), only the request structures have been merged already. |
sourcekit-lsp does not support formatting Swift Ref: swiftlang/sourcekit-lsp#576 Ref: swiftlang/sourcekit-lsp#361
For anyone having the problem that sourcekit is not able to perform the code format action. If you happen to use neovim, there's one working solution (as a workaround) using this null-ls plugin. There're a few steps to set up:
local null_ls = require("null-ls")
local swift_format = require("null-ls.builtins.formatting.swift-format")
null_ls.register({swift_format})
|
Since swift-syntax no longer depends on the C++ parser library and thus swift-format also doesn’t, we can use swift-format to format an entire document. Fixes swiftlang#576 rdar://96159694
Since swift-syntax no longer depends on the C++ parser library and thus swift-format also doesn’t, we can use swift-format to format an entire document. Fixes swiftlang#576 rdar://96159694
Since swift-syntax no longer depends on the C++ parser library and thus swift-format also doesn’t, we can use swift-format to format an entire document. Fixes swiftlang#576 rdar://96159694
Depend on the swift-format library to discover and write the swift-format configuration file. Invoke swift-format from the toolchain to actually format a document. This makes sure that the formatting of SourceKit-LSP and the swift-format executable in the toolchain never get out of sync. Fixes swiftlang#576 rdar://96159694
Depend on the swift-format library to discover and write the swift-format configuration file. Invoke swift-format from the toolchain to actually format a document. This makes sure that the formatting of SourceKit-LSP and the swift-format executable in the toolchain never get out of sync. Fixes swiftlang#576 rdar://96159694
Sorry if this request is covered elsewhere.
The text was updated successfully, but these errors were encountered: