Default app
On macOS, Settings, Integrations, Open these file types with Writ has a box per group: Plain text & logs, Markdown, Config & data, Source code. macOS keeps the choice per file type. The guide on making Writ the app for .md and .txt covers Windows and Linux.