Comments (9)
Hi @arichiardi
Thanks for proposal.
But I can not imagine what kind of movement you expect to json-reformat-line
.
Could you tell me what you are expecting for that function?
e.g.
Before:
After(1):
After(2):
other..?
from json-reformat.
from json-reformat.
Probably after (1) is the less surprising of the two.
from json-reformat.
If you use js-mode
, js-indent-line
is assigned to indent-line-function
.
from json-reformat.
I am using js2-mohe
and for some reason it keeps indenting 4 spaces instead of 2.
from json-reformat.
When js2-mode, js2-indent-line
is assigned.
https://github.com/mooz/js2-mode/blob/master/js2-mode.el#L101-L105
from json-reformat.
I see, but wouldn't be better to have consistency? I think what I see now is that when I use yours it uses one kind of formatting and when I use js2
's I get another. I am also very familiar with Emacs internals so I might actually give this a shot sooner or later.
from json-reformat.
to have consistency?
I think there is a consistent between json-reformat
and js-mode
(js2-mode
) if those indent-level equal.
(setq json-reformat:indent-width 4)
(setq js2-basic-offset 4)
from json-reformat.
I thought I tried that, I will try again.
from json-reformat.
Related Issues (20)
- json-encode-string usage for reformating HOT 2
- Slashes are escaped HOT 2
- Substitution Problems HOT 4
- Display the error line number HOT 3
- The slash symbol was escaped after formatting HOT 2
- json-reformat-region changes content of json HOT 9
- Can not download HOT 2
- Feature request: add a minify command (opposite of beautify) HOT 2
- Fail test on Emacs 25 json-reformat-test:json-reformat-region-occur-error and json-reformat-test:string-to-string HOT 1
- Bind json-reformat-region to a key HOT 3
- Marks buffer dirty even if nothing changed HOT 1
- Reverses field order of objects HOT 2
- Silently discards anything following the first JSON expression HOT 1
- Pretty-print setting convert "{}" to null HOT 1
- json-read-string: Bad string format: "?\\C-j"
- Emacs 27+ - Package cl is deprecated HOT 1
- Doesn't work on temporary indirect buffer like opened Org Mode source block buffer
- Status of this library? HOT 4
- 'loop' is an obsolete alias HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-reformat.