hide-org / hide

🤖 Headless IDE for AI agents
https://hide.sh
MIT License
129 stars 5 forks source link

Autoformat code before saving #69

Open artmoskvin opened 3 months ago

artmoskvin commented 3 months ago

It's a must-have if we're talking about IDE-like experience.

artmoskvin commented 2 months ago

It seems like not all LSP servers support formatting. For example, pyright, LSP server for Python, doesn't support formatting. Instead, Python projects rely on CLI tools like black, autopep8 or ruff. Before any implementation we need to think about how to install and run these CLIs. One option is to run them on host but I think it violates the whole concept of isolated dev envs, so I would prefer if we installed formatting tools in devcontainers.

Another question is how to support different formatters. I think it would be nice if Hide users could specify formatter as part of their project configuration along with the formatter settings. On top of that, Hide could autodetect formatters based on the familiar configuration files in the repo.