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

Determine indent level from more modes #258

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

scop
Copy link
Contributor

@scop scop commented Nov 25, 2023

Pass CSS, GraphQL, HTML, Ruby, Svelte, and YAML mode indent setting to formatters that make use of it through apheleia-formatters-js-indent.

prettier-markdown and prettier-scss attempt to make use of this too, but markdown-mode and scss-mode don't have such a setting that I can tell. Left the uses in place for indent-tabs-mode support anyway.

BTW the apheleia-formatters-js-indent name and its description does not seem quite spot on, as it was already being (partially unsuccessfully) (ab?)used by some modes for which "JavaScript like"ness is a bit of a stretch :)

@scop scop force-pushed the fix/more-js-y-indent-modes branch 2 times, most recently from a1dffeb to 5b38be9 Compare November 26, 2023 11:18
@scop
Copy link
Contributor Author

scop commented Nov 26, 2023

Reworked against current main branch.

@scop scop changed the title Make use of indent setting for more JS'y modes Add more known modes for intelligent indent level guessing Nov 26, 2023
@scop scop force-pushed the fix/more-js-y-indent-modes branch from 5b38be9 to 4d83c23 Compare November 26, 2023 11:21
@scop scop changed the title Add more known modes for intelligent indent level guessing Determine indent level from more modes Nov 26, 2023
@scop scop force-pushed the fix/more-js-y-indent-modes branch 2 times, most recently from 72850c4 to 9e5f03e Compare November 29, 2023 06:40
Namely `graphql-mode`, `html-mode`, `ruby-mode`, `ruby-ts-mode`,
`svelte-mode`, and `yaml-mode`.
@scop scop force-pushed the fix/more-js-y-indent-modes branch from 9e5f03e to a79f027 Compare December 3, 2023 19:14
raxod502
raxod502 previously approved these changes Dec 15, 2023
Copy link
Member

@raxod502 raxod502 left a comment

Choose a reason for hiding this comment

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

✨ Thank you! Sorry for merge conflicts.

@raxod502
Copy link
Member

At least we got that pesky variable renamed though with the refactor!

Copy link
Member

@raxod502 raxod502 left a comment

Choose a reason for hiding this comment

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

@raxod502 raxod502 merged commit 022cf17 into radian-software:main Dec 15, 2023
4 checks passed
@scop scop deleted the fix/more-js-y-indent-modes branch December 15, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants