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

.swiftformat config not detected #450

Open
nguyenvukhang opened this issue Feb 23, 2023 · 0 comments
Open

.swiftformat config not detected #450

nguyenvukhang opened this issue Feb 23, 2023 · 0 comments

Comments

@nguyenvukhang
Copy link

Here's a minimal example:

// main.swift
class A {
    let v: Int
    init() {
        self.v = 0
    }
}
// .swiftformat
--self init-only

With these two files in the same folder and with swiftformat installed,

  • Calling :Neoformat yields
    // main.swift
    class A {
        let v: Int
        init() {
            v = 0
        }
    }
  • While calling :!swiftformat %:p yields the expected outcome:
    // main.swift
    class A {
        let v: Int
        init() {
            self.v = 0
        }
    }

I tried poking around in formatters/swift.vim and a bit in neoformat.vim but I can't quite isolate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant