mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat: Add Solidity Module (#5047)
* Adding documentation * Documentation and schema addition * Creating solidity config * Module for solidity lang * Updating all the files * Changing according to clippy * Fixing misspellings * Changes suggested by clippy * Updating schema , maybe fixing docs workflow error * Updating schema * Removing solcjs from default compiler list * Fallback test added and test string fixed * Fixing docs * Updating schema * Updating schema * Fixing docs * Updating schema * Updating schema * Typo fix * Update docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/utils.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Fix build commit --------- Co-authored-by: Anirban Halder <shaeo967@gmail.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ce01423152
commit
b2ebd5b50c
@@ -311,6 +311,7 @@ $red\
|
||||
$ruby\
|
||||
$rust\
|
||||
$scala\
|
||||
$solidity\
|
||||
$swift\
|
||||
$terraform\
|
||||
$vlang\
|
||||
@@ -3817,6 +3818,45 @@ and `$SINGULARITY_NAME` is set.
|
||||
format = '[📦 \[$env\]]($style) '
|
||||
```
|
||||
|
||||
## Solidity
|
||||
|
||||
The `solidity` module shows the currently installed version of [Solidity](https://soliditylang.org/)
|
||||
The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with the `.sol` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${major}.${minor}.${patch}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `"S "` | A format string representing the symbol of Solidity |
|
||||
| `compiler | ["solc"] | The default compiler for Solidity. |
|
||||
| `detect_extensions` | `["sol"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables this module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v0.8.1` | The version of `solidity` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
[solidity]
|
||||
format = "via [S $version](blue bold)"
|
||||
```
|
||||
|
||||
## Spack
|
||||
|
||||
The `spack` module shows the current [Spack](https://spack.readthedocs.io/en/latest/) environment, if `$SPACK_ENV` is set.
|
||||
|
||||
Reference in New Issue
Block a user