combobulate
combobulate copied to clipboard
Cycling yaml indentations
It would be nice to have a function similar to combobulate-python-indent-for-tab-command
in yaml (probably called combobulate-yaml-indent-for-tab-command
).
I am not too familiar with neither combobulate nor treesit yet, but if you have some pointers about how to implement it I could give it a try.
That's a great idea. The only caveat is that yaml-ts-mode does not have an indentation engine at all!
I need to change combobulate so it'll work on non-ts-modes, then you can at least use the third-party yaml-mode to do indentation and then combobulate can maybe use that.
Actually there is yaml-pro that achieves similar results using treesit in the functions yaml-pro-ts-indent-subtree
and yaml-pro-ts-unindent-subtree
.
And the non-ts yaml-mode can already cycle indentations :). Perhaps we should spend some effort on giving yaml-ts-mode a basic indentation function using tree-sitter first?
Indeed. It shouldn't take more than a few hours to write one, to be honest. Using Combobulate's query builder to help match things should make things easier!
For indentation in yaml-ts-mode
, I just use indent-rigidly
with C-x TAB
after selecting a region, though I haven't tried it after selecting a node with combobulator.