Skip to content

Add jsonian-format-region#53

Merged
iwahbe merged 13 commits intomainfrom
iwahbe/format-region
Aug 26, 2023
Merged

Add jsonian-format-region#53
iwahbe merged 13 commits intomainfrom
iwahbe/format-region

Conversation

@iwahbe
Copy link
Owner

@iwahbe iwahbe commented Aug 23, 2023

This PR adds jsonian-format-region, with jsonian--huge-edit drawn from #48. To merge, jsonian-format-region must

  • Be fast: we expect to beat json-pretty-print on large files. 4d27a2a already meets this requirement.
  • Be accurate: we correctly format all json that jsonian-format-region is run on. We should produce a result at least as good as json-pretty-print.
  • Tolerate comments: comments should persist through formatting when in jsonian-c-mode, each getting their own line.
  • Be local: Allow formatting an arbitrary region in a larger json structure.
  • Report progress: self-explanatory.
  • Be documented: This function should be mentioned in the package header and in the README.md.

Of course all of these properties need to be under test.

To consider:

  • provide a binding in jsonian-mode-map.

@iwahbe iwahbe self-assigned this Aug 23, 2023
@iwahbe iwahbe force-pushed the iwahbe/format-region branch from 91c4df6 to 52b3017 Compare August 25, 2023 16:08
@iwahbe iwahbe force-pushed the iwahbe/format-region branch 2 times, most recently from 54db0ca to 91e5d7f Compare August 26, 2023 01:38
@iwahbe iwahbe force-pushed the iwahbe/format-region branch from 91e5d7f to dc3192f Compare August 26, 2023 01:38
@iwahbe iwahbe force-pushed the iwahbe/format-region branch from 2fe3534 to ec1a21e Compare August 26, 2023 02:43
@iwahbe
Copy link
Owner Author

iwahbe commented Aug 26, 2023

Huge edit implementations were borrowed from @taku0.

@iwahbe iwahbe merged commit 75ecae8 into main Aug 26, 2023
@iwahbe iwahbe deleted the iwahbe/format-region branch August 26, 2023 02:59
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.

1 participant