Skip to content

Add a basic editorconfig file. #369

Open
MangoIV wants to merge 1 commit intohaskell:masterfrom
MangoIV:mangoiv/editorconfig
Open

Add a basic editorconfig file. #369
MangoIV wants to merge 1 commit intohaskell:masterfrom
MangoIV:mangoiv/editorconfig

Conversation

@MangoIV
Copy link
Copy Markdown
Contributor

@MangoIV MangoIV commented May 4, 2026

Editorconfig can be used to unintrusevely make editors cohere with basic formatting standards used in a projects, e.g.

  • tabs vs spaces
  • default tab width (i.e. when doing line breaks)
  • trailing whitespace
  • file encoding

It is supported by all major editors and doesn't need any extra configuration in most.

Vscode and neovim for example just make it work out of the box.

@MangoIV MangoIV changed the title Mangoiv/editorconfig Add a basic editorconfig file. May 4, 2026
@tomjaguarpaw
Copy link
Copy Markdown
Member

Seems OK to me. @bgamari?

Is there also a command line tool to apply the formatting, in case someone is using an editor that doesn't support it? (I have no idea how I would get this to work on Emacs, for example.)

@MangoIV
Copy link
Copy Markdown
Contributor Author

MangoIV commented May 4, 2026

yes, I think there's a command line tool, but I think the main advantage is that it catches "the vast majority" of cases without being otherwise intrusive. As you see I didn't reformat the project either, even though there might e.g. be trailing white space or tabs elsewhere.

Wrt emacs, it should be supported "out of the box" afaict link to docs

@tomjaguarpaw tomjaguarpaw requested a review from bgamari May 4, 2026 14:21
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

Successfully merging this pull request may close these issues.

2 participants