CrossBreezeNL/crossmodel

Text editor is not handling indentation and - prefix within collections automatically

harmen-xb opened this issue · 2 comments

When writing a YAML file by hand, and you type the property name of a collection and then press 'Enter', to get to the next line the identation is not automatically done. You have to indent it yourself to get the right auto-completion.

Since within the grammer it is known that we just typed the name of a collection/array the LSP/editor should be aware that indentation needs to happen.

After indentation for a collection we always need to start with a '- ' the describe the item in the collection, which can also be automated.

@martin-fleck-at

I saw in Langium there now is official indent and dedent support: eclipse-langium/langium#1016

I guess we can use this i.s.o. of our custom indent dedent stuff?

And also would using this help with solving this issue?

Yes, I think that should help us get rid of some of our custom implementation. In general, I believe it might be good idea to upgrade our Langium version but there were some breaking changes, so we need to be careful.