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

Update editor config indent #1126

Merged
merged 2 commits into from
Dec 21, 2022
Merged

Update editor config indent #1126

merged 2 commits into from
Dec 21, 2022

Conversation

AndreasArvidsson
Copy link
Member

Checklist

.editorconfig Outdated Show resolved Hide resolved
@auscompgeek
Copy link
Member

Curious why? FWIW Prettier has an open issue to switch the default to tabs.

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Nov 9, 2022

Curious why? FWIW Prettier has an open issue to switch the default to tabs.

The main reason is this
https://github.com/cursorless-dev/cursorless/pull/1126/files#diff-ce616deccd5f516e1b391ea2e6dd39c415e0959a3c72cf8e17a4635023437a6b

The left hand side is more whitespace than actual content. Also I prefer to just have the same indentation settings no matter the language.

@auscompgeek
Copy link
Member

The left hand side is more whitespace than actual content.

I don't understand; I see the same amount of whitespace in both.

image

To be doubly-sure I even disabled browser extensions that mess with the GitHub UI.

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Nov 9, 2022

@auscompgeek This is how it looks for me. I'm pretty sure @pokey had a similar problem.

image

@auscompgeek
Copy link
Member

image

Still looks reasonable to me in split diff mode.

@pokey
Copy link
Member

pokey commented Nov 9, 2022

Looks like it's a GitHub setting

The advantage of tabs is that you can decide how wide you want them to be

@AndreasArvidsson
Copy link
Member Author

Looks like it's a GitHub setting

The advantage of tabs is that you can decide how wide you want them to be

Cool thanks, but since 8 is the default spaces have the advantage of being consistent. Personally I don't se why you would want tabs in some languages and spaces in other.

@pokey
Copy link
Member

pokey commented Nov 9, 2022

The argument would be to use tabs everywhere

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Nov 10, 2022

The argument would be to use tabs everywhere

I much rather have tabs than mixing

@pokey
Copy link
Member

pokey commented Nov 10, 2022

I think tabs are better in theory, but I worry that in practice they may be a bit cumbersome. Eg

@auscompgeek if you are planning to make it to meet-up today maybe we can discuss then

@pokey pokey added the to discuss Plan to discuss at meet-up label Nov 10, 2022
@AndreasArvidsson AndreasArvidsson changed the title Use spaces instead of tab indentation for json files Update editor config indent Nov 10, 2022
@AndreasArvidsson AndreasArvidsson removed the to discuss Plan to discuss at meet-up label Nov 10, 2022
.editorconfig Outdated Show resolved Hide resolved
@phillco
Copy link
Member

phillco commented Nov 10, 2022

+1 on just converting everything to spaces.

Also, lol at that list of merge conflicts :)

@AndreasArvidsson
Copy link
Member Author

+1 on just converting everything to spaces.

Also, lol at that list of merge conflicts :)

After today's session we went other route and actually changed everything into tabs :D

@phillco
Copy link
Member

phillco commented Nov 10, 2022

Ah well. As long as it's consistent.

@pokey
Copy link
Member

pokey commented Dec 13, 2022

@auscompgeek
Copy link
Member

Oh goodie, I can finally convert my vim config to VSCode

@pokey pokey self-assigned this Dec 15, 2022
@pokey
Copy link
Member

pokey commented Dec 20, 2022

For now, let's stick to spaces, as the tooling hasn't really caught up with tabs yet, eg:

  • yaml heredocs converting to inline strings,
  • yaml not supporting tab indentation
  • VSCode disallowing auto-indent detection,
  • GitHub large spaces by default

We can revisit once Prettier 3 comes out

@AndreasArvidsson
Copy link
Member Author

@pokey Updated once again with space indentation

@pokey pokey merged commit 4dc746c into main Dec 21, 2022
@pokey pokey deleted the space_indent branch December 21, 2022 12:07
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.

4 participants