WIP: Add a setting to visually redact enviroment variables (#7124)

Release Notes:

- Added bash syntax highlighting to `.env` files. 
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.

---------

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Mikayla Maki 2024-01-31 11:42:09 -08:00 committed by GitHub
parent 5333eff0e4
commit f98d636203
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 330 additions and 32 deletions

View file

@ -13,6 +13,7 @@ pub struct EditorSettings {
pub scrollbar: Scrollbar,
pub relative_line_numbers: bool,
pub seed_search_query_from_cursor: SeedQuerySetting,
pub redact_private_values: bool,
}
/// When to populate a new search's query based on the text under the cursor.
@ -93,6 +94,13 @@ pub struct EditorSettingsContent {
///
/// Default: always
pub seed_search_query_from_cursor: Option<SeedQuerySetting>,
/// Hide the values of variables in `private` files, as defined by the
/// private_files setting. This only changes the visual representation,
/// the values are still present in the file and can be selected / copied / pasted
///
/// Default: false
pub redact_private_values: Option<bool>,
}
/// Scrollbar related settings