feat: .NET appsettings files in repos
appsettings.json and appsettings.<Environment>.json tracked by git are listed under Repos, keys named as .NET names them (ConnectionStrings:Default). - The secret patterns pick the keys, the rest hidden, with dotnet.secretPatterns for .NET files' own. - An App Service Key Vault reference, @Microsoft.KeyVault(…), is marked as a reference; a BOM at the start is fine. - A .NET icon, themeable with dotnetColor.
This commit is contained in:
17 files changed
+224
-22
No files matched your search
@@ -36,6 +36,7 @@ type Styles struct {
|
||||
KindRepo lipgloss.Style
|
||||
Spring lipgloss.Style // Spring Boot config files
|
||||
Compose lipgloss.Style // Docker Compose files
|
||||
Dotnet lipgloss.Style // .NET appsettings files
|
||||
|
||||
// themed marks the selection colours as set by the theme, so
|
||||
// OnBackground leaves them.
|
||||
@@ -74,6 +75,7 @@ func Default() Styles {
|
||||
KindRepo: lipgloss.NewStyle().Foreground(lipgloss.Magenta),
|
||||
Spring: lipgloss.NewStyle().Foreground(lipgloss.Green),
|
||||
Compose: lipgloss.NewStyle().Foreground(lipgloss.Blue),
|
||||
Dotnet: lipgloss.NewStyle().Foreground(lipgloss.BrightMagenta),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ var Roles = map[string]string{
|
||||
"repoColor": "repos and their secret files (SOPS)",
|
||||
"springColor": "Spring Boot config files",
|
||||
"composeColor": "Docker Compose files",
|
||||
"dotnetColor": ".NET appsettings files",
|
||||
}
|
||||
|
||||
// FromTheme returns the default styles with the theme's roles applied, and
|
||||
@@ -105,6 +106,8 @@ func FromTheme(theme map[string][]string) (Styles, color.Color, error) {
|
||||
st.Spring = v.fg(lipgloss.NewStyle())
|
||||
case "composeColor":
|
||||
st.Compose = v.fg(lipgloss.NewStyle())
|
||||
case "dotnetColor":
|
||||
st.Dotnet = v.fg(lipgloss.NewStyle())
|
||||
}
|
||||
}
|
||||
return st, fg, nil
|
||||
|
||||
Reference in new issue
Block a user