link compile-time options together in docs (#16879)

* link similar compiler option proc together

* fixup links

* fix formatting and links

* example formatting

* drop declared

* link to compilesettings

* only link define pragmas once

* drop another declared

* backlink to compileOptions from compilesettings

* remove newline
This commit is contained in:
n5m 2021-02-02 08:44:21 +00:00 • committed by GitHub
commit f87b9866af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 4 deletions

View file

@ -43,14 +43,26 @@ type
proc querySetting*(setting: SingleValueSetting): string {.
compileTime, noSideEffect.} = discard
## Can be used to get a string compile-time option. Example:
## Can be used to get a string compile-time option.
##
## See also:
## * `compileOption <system.html#compileOption,string>`_ for `on|off` options
## * `compileOption <system.html#compileOption,string,string>`_ for enum options
##
## Example:
##
## .. code-block:: Nim
## const nimcache = querySetting(SingleValueSetting.nimcacheDir)
proc querySettingSeq*(setting: MultipleValueSetting): seq[string] {.
compileTime, noSideEffect.} = discard
## Can be used to get a multi-string compile-time option. Example:
## Can be used to get a multi-string compile-time option.
##
## See also:
## * `compileOption <system.html#compileOption,string>`_ for `on|off` options
## * `compileOption <system.html#compileOption,string,string>`_ for enum options
##
## Example:
##
## .. code-block:: Nim
## const nimblePaths = compileSettingSeq(MultipleValueSetting.nimblePaths)