vscode-fluent icon indicating copy to clipboard operation
vscode-fluent copied to clipboard

Sort Keys

Open ya7010 opened this issue 7 months ago • 2 comments

It would be useful to have the ability to auto-sort keys in .flt files.

ya7010 avatar May 30 '25 04:05 ya7010

Hey, thanks for opening an issue!

At this moment, we don’t support any linting features.

The extension is still missing some foundational pieces needed to implement what you’re suggesting.

A while back, I did a quick POC for an auto-formatter that rewrites the code from its AST.

For example, it could transform:

foo = blah {$value } bleh

into

foo = blah { $value } bleh

I’m not actively developing new features for this extension, as I’m currently focused on this new project.

That said, if you’re interested in contributing to vscode-fluent, I would be glad to assist you!

macabeus avatar May 30 '25 13:05 macabeus

@macabeus

Thanks for the great info!

I took a look at fluent and found https://github.com/projectfluent/tree-sitter-fluent.

It might be a good idea to use this as a reference when creating a formatter.

ya7010 avatar May 30 '25 14:05 ya7010