You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow up issue to this twitter conversation we had with @domenkozar the other day.
Below is initial example that caught my attention by duplication of a file extension and formatter, they are essentially the same thing, but typed twice.
I suggest to create a default heuristic so we infer formatters from the file extension and fall back to explicit definition when necessary. For example:
{pkgs,lib,config, ... }: {files={# Formatters inferred"foo.json"={foo="bar";};"dir/foo.txt"="foo";# Formatter defined within configuration object, hence the `files` module # must support polymorphism"crates/foo/Cargo.lock"={content={ ... };formatter="json";};};}
I think it is doable to create a map between the supported formatters and file extensions. By this, we keep cognitive load low and don't cut off total control when it's needed.
The text was updated successfully, but these errors were encountered:
Follow up issue to this twitter conversation we had with @domenkozar the other day.
Below is initial example that caught my attention by duplication of a file extension and formatter, they are essentially the same thing, but typed twice.
I suggest to create a default heuristic so we infer formatters from the file extension and fall back to explicit definition when necessary. For example:
I think it is doable to create a map between the supported formatters and file extensions. By this, we keep cognitive load low and don't cut off total control when it's needed.
The text was updated successfully, but these errors were encountered: