make config.nims behave like nim.cfg in terms of where these scripts are searched / run (#8682)

* run project config.nims if exists, then inputfile.nims if exists
* ~/.config/nim/config.nims can now be used
* also check in getSystemConfigPath for config.nims
* refactor handleCmdLine for nim and nimsuggest
This commit is contained in:
Timothee Cour 2018-08-30 04:52:32 -07:00 • committed by Andreas Rumpf
commit ed0cb7b85d
7 changed files with 152 additions and 114 deletions

View file

@ -651,7 +651,7 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
else: localError(conf, info, "invalid option for --symbolFiles: " & arg)
of "skipcfg":
expectNoArg(conf, switch, arg, pass, info)
incl(conf.globalOptions, optSkipConfigFile)
incl(conf.globalOptions, optSkipSystemConfigFile)
of "skipprojcfg":
expectNoArg(conf, switch, arg, pass, info)
incl(conf.globalOptions, optSkipProjConfigFile)