Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Add a .editorconfig - #435

Merged
cocreature merged 2 commits into
haskell:masterfrom
ndmitchell:patch-34
Feb 17, 2020
Merged

cocreature merged 2 commits into
haskell:masterfrom
ndmitchell:patch-34

Conversation

@ndmitchell

Copy link
Copy Markdown
Collaborator

Only thing perhaps controversial here is 4 spaces for an indent, as much of this code uses 2 spaces (👋 at @DavidM-D). But as a project it's good to pick one level of indent to aim at.

@cocreature cocreature left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cocreature
cocreature merged commit dee0624 into haskell:master Feb 17, 2020
@jneira

jneira commented Feb 17, 2020 •

Copy link
Copy Markdown
Member

I would add a warning for windows users due to the LF option: they should disable auto.clrf in git, take care of not copy external files with CR/LF and change its editor configuration to take .editorconfig if it is supported (or change it manually if not)
I think i had to install a vscode extension to make it honour .editorconfig and for other editors a plugin is definitely needed (following editorconfig.org)

pepeiborra pushed a commit to pepeiborra/ghcide that referenced this pull request Feb 22, 2020
* Add a .editorconfig

* Move to https
@ndmitchell
ndmitchell deleted the patch-34 branch February 28, 2020 11:20
@ndmitchell

Copy link
Copy Markdown
Collaborator Author

Where would we put the warning so Windows users would see it? In my view, the auto.clrf thing should never be turned on by any Windows users - it's like the auto crlf thing in tar and WinZip - a constant source of pain for the benefit of those users who want to edit text files in a version of Notepad on Windows ME. </rant>

@jneira

jneira commented Feb 28, 2020 •

Copy link
Copy Markdown
Member

Well, i think that, by default, almost all windows editors use cr/lf for new files, although they don't change them if you uses an existing one, right?
So you have to ensure your editor uses by default lf for new files (convince it to use .editorconfig or change its configuration globally/per project). In my experience users does not change the default, by default 😉 so a warning could be useful.
Otoh if you move a file from other location with cr/lf without editing it you'll leak it in the repo too.

I agree with you on git auto.crlf but the fact is git for windows suggest you enable it and quite users will have it (myself!) so add a note in the contributing section could help too.

ndmitchell added a commit to ndmitchell/ghcide that referenced this pull request Mar 1, 2020
@ndmitchell

Copy link
Copy Markdown
Collaborator Author

Added in #463.

cocreature pushed a commit that referenced this pull request Mar 2, 2020
* Add a note about hacking on ghcide from Windows

See #435 (comment) for context

* Update README.md

Co-Authored-By: Javier Neira  <[email protected]>

Co-authored-by: Javier Neira  <[email protected]>
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Add a .editorconfig

* Move to https
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Add a .editorconfig

* Move to https
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Add a .editorconfig

* Move to https
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants