diff options
author | Shu Kutsuzawa <cappyzawa@gmail.com> | 2021-02-22 03:50:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 19:50:40 +0100 |
commit | e73581ddf00207fa0b17a07b43ac0f7785eb1811 (patch) | |
tree | 80691127184be8d90bafd20f9544ac915d001f3f /docs | |
parent | 509767adc02c39f206e7f0df15920ddba1b2444e (diff) |
feat(ocaml): Configure when the module is shown (#2354)
This makes it possible to configure when the ocaml module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/config/README.md | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index a952e9f1c..7104d1d57 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -1832,7 +1832,7 @@ format = "via [🤖 $version](bold green) " ## OCaml The `ocaml` module shows the currently installed version of OCaml. -The module will be shown if any of the following conditions are met: +By default the module will be shown if any of the following conditions are met: - The current directory contains a file with `.opam` extension or `_opam` directory - The current directory contains a `esy.lock` directory @@ -1843,12 +1843,15 @@ The module will be shown if any of the following conditions are met: ### Options -| Option | Default | Description | -| ---------- | ------------------------------------ | ------------------------------------------------------- | -| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | -| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | -| `style` | `"bold yellow"` | The style for the module. | -| `disabled` | `false` | Disables the `ocaml` module. | +| Option | Default | Description | +| ------------------- | ------------------------------------ | ------------------------------------------------------- | +| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. | +| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. | +| `detect_extensions` | `["opam", "ml", "mli", "re", "rei"]` | Which extensions should trigger this moudle. | +| `detect_files` | `["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"]` | Which filenames should trigger this module. | +| `detect_folders` | `["_opam", "esy.lock"]` | Which folders should trigger this module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `ocaml` module. | ### Variables |