yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

implemented the squeceItem identation based on the sequenceItemIndent…

Open msivasubramaniaan opened this issue 3 years ago • 4 comments

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 image

  • When sequenceItemIndent is 2 image

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

msivasubramaniaan avatar Nov 03 '21 05:11 msivasubramaniaan

Coverage Status

Coverage increased (+0.009%) to 78.199% when pulling e07db944765843676e9207ee93158553f0c781e3 on msivasubramaniaan:do-indent-sequenceItem-based-on-settings into 13adb0e02199ce673e582bb5387577f9936a66a1 on redhat-developer:main.

coveralls avatar Nov 03 '21 05:11 coveralls

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?

evidolob avatar Nov 03 '21 10:11 evidolob

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

JPinkney avatar Nov 03 '21 12:11 JPinkney

I agree, having to split the formatting logic between the extension and the upstream library is going to cause us more long term issues.

gorkem avatar Dec 15 '21 16:12 gorkem