yaml-language-server
yaml-language-server copied to clipboard
implemented the squeceItem identation based on the sequenceItemIndent…
What does this PR do?
Doing indentation on sequeceItem based on the settings. If sequenceItemIndent is 0 then the sequenceItem not perform any indentation and it acquire it parent value itself. Suppose sequenceItemIndent contains any values, it will do the indentation on sequenceItem.
-
When sequenceItemIndent is 0

-
When sequenceItemIndent is 2

What issues does this PR fix or reference?
https://github.com/redhat-developer/vscode-yaml/issues/172
Is it tested? How?
Yes. Using test cases
Coverage increased (+0.009%) to 78.199% when pulling e07db944765843676e9207ee93158553f0c781e3 on msivasubramaniaan:do-indent-sequenceItem-based-on-settings into 13adb0e02199ce673e582bb5387577f9936a66a1 on redhat-developer:main.
And I'm not very happy with having own code which do formatting after executing formatter tool. I think it would be better if we change formatter tool or contribute to them new features. @JPinkney @gorkem WDYT?
I'd prefer not to own any more of the formatter stuff then we have to. With that said, prettier is very opinionated and probably wouldn't allow us to contribute this feature. Maybe we can switch to prettier-x which is a less opinionated version of prettier and can contribute this feature there
I agree, having to split the formatting logic between the extension and the upstream library is going to cause us more long term issues.