Skip to content
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

[SR-146] Move the swift indentation mechanism from SourceKit to libIDE and utilize it for a 'swift-format' tool #42768

Closed
akyrtzi opened this issue Dec 8, 2015 · 4 comments
Labels
feature A feature request or implementation good first issue Good for newcomers source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@akyrtzi
Copy link
Member

akyrtzi commented Dec 8, 2015

Previous ID SR-146
Radar None
Original Reporter @akyrtzi
Type New Feature
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 3
Component/s Source Tooling
Labels New Feature, StarterBug
Assignee None
Priority Medium

md5: 9dbc0cc9b44435dff437b44922a6c8dd

is blocked by:

  • SR-2188 Xcode closure auto-indentation is hard to read with some styles

Issue Description:

SourceKit contains indentation logic that is not exposed in the libIDE library; this is not desirable because SourceKit is not cross-platform. Here are some steps to improve on this:

  • Move the indentation logic from SourceKit to libIDE. Have SourceKit just expose the functionality contained in libIDE.

  • Start a 'swift-format' tool that uses the indentation mechanism from libIDE; given a file and source range it auto-indents it.

  • See prior work for 'clang-format' (http://clang.llvm.org/docs/ClangFormat.html) for investigation on how to specify and provide formatting options.

@swift-ci
Copy link
Collaborator

Comment by John Regner (JIRA)

Submitted PR-1686 #1686 . Which makes progress on this. The PR proposes to move the indentation logic from SourceKit -> libIDE.
(it does not include the creation of the `swift-format` tool)

@swift-ci
Copy link
Collaborator

Comment by Mohammed M. Ennabah (JIRA)

@akyrtzi I think this is merged and should be marked as resolved.

@swift-ci
Copy link
Collaborator

Comment by Eddy Gammon (JIRA)

Done in #1686

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation and removed new feature labels Nov 11, 2022
@AnthonyLatsis
Copy link
Collaborator

For posterity: https://github.com/apple/swift-format

@AnthonyLatsis AnthonyLatsis added the source tooling Area: IDE support, SourceKit, and other source tooling label Nov 11, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation good first issue Good for newcomers source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

3 participants