Skip to content

Indent lost in big json file #861

Closed Answered by lukas-reineke
Lun4m asked this question in Q&A
Discussion options

You must be logged in to vote

This is expected behavior.
IBL uses both your settings, like shfitwidth, as well as the surrounding code, to determine indentations.
But looking at the surrounding code from the beginning of the file would be very slow, so by default it only looks at 30 lines above the first displayed line.
So if the start of the indentation is further up than that, it uses shiftwidth instead.

You can change how big this buffer is with :help ibl.config.viewport_buffer.min, but the correct solution is to just set shiftwidth.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Lun4m
Comment options

Answer selected by lukas-reineke
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants