yaml-language-server
yaml-language-server copied to clipboard
Fix indentation with extra spaces after cursor.
What does this PR do?
Fixes an indentation issue when you have trailing spaces after the hyphen.
Given the schema:
{
type: 'object',
properties: {
test: {
type: 'array',
items: {
type: 'object',
properties: {
objA: {
type: 'object',
required: ['itemA'],
properties: {
itemA: {
type: 'string',
}
}
}
}
}
}
}
}
The following yaml:
test:
- #________(# = cursor, _ = spaces)
Would be autocompleted to:
test:
- objA:
itemA:
After the fix it autocompletes to:
test:
- objA:
itemA:
What issues does this PR fix or reference?
no ref
Is it tested? How?
Manual and unit test.