Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycling yaml indentations #50

Open
lerouxrgd opened this issue Aug 14, 2023 · 5 comments
Open

Cycling yaml indentations #50

lerouxrgd opened this issue Aug 14, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@lerouxrgd
Copy link

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.

@mickeynp
Copy link
Owner

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.

@mickeynp mickeynp added the enhancement New feature or request label Aug 17, 2023
@lerouxrgd
Copy link
Author

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.

@wyuenho
Copy link

wyuenho commented Sep 7, 2023

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?

@mickeynp
Copy link
Owner

mickeynp commented Sep 8, 2023

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!

@dcunited001
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants