Repository: CodeEditApp/CodeEdit
File: CodeEdit/Features/AppPreferences/Model/Terminal/TerminalPreferences.swift (Swift)

Code before:
        var useThemeBackground: Bool = true

        /// If true, the terminal treats the `Option` key as the `Meta` key
        var optionAsMeta: Bool = false

        /// The selected shell to use.
        var shell: TerminalShell = .system

        /// The font to use in terminal.
        var font: TerminalFont = .init()

        // The cursor style to use in terminal
        var cursorStyle: TerminalCursorStyle = .steadyBlock

        /// Default initializer
        init() {}

        /// Explicit decoder init for setting default values when key is not present in `JSON`
        init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            self.darkAppearance = try container.decodeIfPresent(Bool.self, forKey: .darkAppearance) ?? false
            self.optionAsMeta = try container.decodeIfPresent(Bool.self, forKey: .optionAsMeta) ?? false
            self.shell = try container.decodeIfPresent(TerminalShell.self, forKey: .shell) ?? .system
            self.font = try container.decodeIfPresent(TerminalFont.self, forKey: .font) ?? .init()
            self.cursorStyle = try container.decodeIfPresent(TerminalCursorStyle.self,
                                                             forKey: .cursorStyle) ?? .steadyBlock
        }
    }

    /// The shell options.
    /// - **bash**: uses the default bash shell
    /// - **zsh**: uses the ZSH shell
    /// - **system**: uses the system default shell (most likely ZSH)
    enum TerminalShell: String, Codable {
        case bash
        case zsh
        case system
    }

    enum TerminalCursorStyle: String, Codable {
        case blinkBlock
        case steadyBlock
        case blinkUnderline
        case steadyUnderline
        case blinkingBar
        case steadyBar
    }
    struct TerminalFont: Codable {
        /// Indicates whether or not to use a custom font
        var customFont: Bool = false


Review comment (suggestion):
This needs to be formatted this way (see [code style](https://github.com/CodeEditApp/CodeEdit/wiki/Code-Style#parameter-alignment))

```suggestion
            self.cursorStyle = try container.decodeIfPresent(
                TerminalCursorStyle.self,
                forKey: .cursorStyle
            ) ?? .steadyBlock
```

Code after:
        var useThemeBackground: Bool = true

        /// If true, the terminal treats the `Option` key as the `Meta` key
        var optionAsMeta: Bool = false

        /// The selected shell to use.
        var shell: TerminalShell = .system

        /// The font to use in terminal.
        var font: TerminalFont = .init()

        // The cursor style to use in terminal
        var cursorStyle: TerminalCursorStyle = .block

        // Toggle for blinking cursor or not
        var cursorBlink: Bool = false

        /// Default initializer
        init() {}

        /// Explicit decoder init for setting default values when key is not present in `JSON`
        init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            self.darkAppearance = try container.decodeIfPresent(Bool.self, forKey: .darkAppearance) ?? false
            self.optionAsMeta = try container.decodeIfPresent(Bool.self, forKey: .optionAsMeta) ?? false
            self.shell = try container.decodeIfPresent(TerminalShell.self, forKey: .shell) ?? .system
            self.font = try container.decodeIfPresent(TerminalFont.self, forKey: .font) ?? .init()
            self.cursorStyle = try container.decodeIfPresent(
                TerminalCursorStyle.self,
                forKey: .cursorStyle
            ) ?? .block
            self.cursorBlink = try container.decodeIfPresent(Bool.self, forKey: .cursorBlink) ?? false
        }
    }

    /// The shell options.
    /// - **bash**: uses the default bash shell
    /// - **zsh**: uses the ZSH shell
    /// - **system**: uses the system default shell (most likely ZSH)
    enum TerminalShell: String, Codable {
        case bash
        case zsh
        case system
    }

    enum TerminalCursorStyle: String, Codable {
        case block
        case underline
        case bar
    }