The `nim.cfg` language is slightly less spartan than what @Clonk says. It has 
(`@if`, `@else`, `@elif`, `@end`) conditionals and strings, comments, and 
environment variable expansion (`$home`), and maybe a little bit more. 
`config/nim.cfg` in the Nim distro (or `/usr/lib/nim/config/nim.cfg` or similar 
in an "installed Nim") is a large example. It is still _very_ spartan compared 
to NimScript.

Not mentioned anywhere I saw in the linked to manual, but often useful, you can 
use either `foo.nims` or `foo.nim.cfg` to adjust compile flags for compiling 
**_just_** `foo`. `lib/pure/asyncdispatch.nim.cfg` is one example in the stdlib.

A simple experiment shows that presently `foo.nim.cfg` is processed first, if 
it exists and then `foo.nims` if it also exists.

The `config.nims` recommendation is probably right. The stdlib seems to use the 
`.nim.cfg` style exclusively. Maybe there is some reason that someone else 
could explain beyond `nim.cfg` worked first.

Reply via email to