radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
558 stars 75 forks source link

Assume filename correctly #128

Closed elken closed 2 years ago

elken commented 2 years ago

Fixes #108

elken commented 2 years ago

Test fails but functionally works, apheleia-ft needs to handle evaluating the formatter args

raxod502 commented 2 years ago

How does this change look to you?

raxod502 commented 2 years ago

I don't love switching on major modes inside the formatter command, but we don't have a better abstraction for doing this at the moment, so I think it is okay.

elken commented 2 years ago

I don't love switching on major modes inside the formatter command, but we don't have a better abstraction for doing this at the moment, so I think it is okay.

It defaults to the buffer name and only falls back for a temp buffer or something

elken commented 2 years ago

How does this change look to you?

LGTM! I'll push a changelog entry now