parent
25955440df
commit
da476a8723
1 changed files with 10 additions and 5 deletions
|
|
@ -287,16 +287,21 @@ proc loadConfigs*(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef; idgen:
|
|||
if cfg == DefaultConfig:
|
||||
runNimScriptIfExists(pd / DefaultConfigNims)
|
||||
|
||||
for filename in configFiles:
|
||||
# delayed to here so that `hintConf` is honored
|
||||
rawMessage(conf, hintConf, filename.string)
|
||||
|
||||
let scriptFile = conf.projectFull.changeFileExt("nims")
|
||||
let isMain = scriptFile == conf.projectFull
|
||||
template showHintConf =
|
||||
for filename in configFiles:
|
||||
# delayed to here so that `hintConf` is honored
|
||||
rawMessage(conf, hintConf, filename.string)
|
||||
if isMain:
|
||||
showHintConf()
|
||||
configFiles.setLen 0
|
||||
if conf.command != "nimsuggest":
|
||||
runNimScriptIfExists(scriptFile)
|
||||
else:
|
||||
if scriptFile != conf.projectFull:
|
||||
if not isMain:
|
||||
runNimScriptIfExists(scriptFile)
|
||||
else:
|
||||
# 'nimsuggest foo.nims' means to just auto-complete the NimScript file
|
||||
discard
|
||||
showHintConf()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue