categories

package
v0.0.1-alpha.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Appearance = settings.Category{
	ID:          "appearance",
	Label:       "Appearance",
	Description: "Customize the look and feel of the application",
	Icon:        "LuPaintbrush",
	Settings:    map[string]settings.Setting{},
}
View Source
var Developer = settings.Category{
	ID:          "developer",
	Label:       "Developer Settings",
	Description: "Settings for developing or writing plugins within Omniview",
	Icon:        "LuBeaker",
	Settings: map[string]settings.Setting{
		"gopath": {
			ID:          "gopath",
			Label:       "Go Path",
			Description: "Path to the Go binary",
			Type:        settings.Text,
			Default:     "",
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
			},
		},
		"pnpmpath": {
			ID:          "pnpmpath",
			Label:       "PNPM Path",
			Description: "Path to the PNPM binary",
			Type:        settings.Text,
			Default:     "",
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
			},
		},
		"nodepath": {
			ID:          "nodepath",
			Label:       "Node Path",
			Description: "Path to the Node binary",
			Type:        settings.Text,
			Default:     "",
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
			},
		},
	},
}
View Source
var Editor = settings.Category{
	ID:          "editor",
	Label:       "Editor",
	Description: "Change settings within the code editor",
	Icon:        "LuCode",
	Settings: map[string]settings.Setting{
		"folding": {
			ID:          "folding",
			Type:        settings.Toggle,
			Label:       "Folding",
			Default:     true,
			Description: "Enable code folding. Defaults to true.",
		},
		"foldingHighlight": {
			ID:          "foldingHighlight",
			Type:        settings.Toggle,
			Label:       "Folding Highlight",
			Default:     true,
			Description: "Enable highlight for folded regions. Defaults to true.",
		},
		"fontSize": {
			ID:          "fontSize",
			Type:        settings.Integer,
			Label:       "Font Size",
			Default:     11,
			Description: "The size of the font in the editor.",
		},
		"fontWeight": {
			ID:          "fontWeight",
			Type:        settings.Text,
			Label:       "Font Weight",
			Default:     11,
			Description: "The font weight.",
		},
		"formatOnPaste": {
			ID:          "formatOnPaste",
			Type:        settings.Toggle,
			Label:       "Format On Paste",
			Default:     false,
			Description: "Enable format on paste. Defaults to false.",
		},
		"formatOnType": {
			ID:          "formatOnType",
			Type:        settings.Toggle,
			Label:       "Format On Type",
			Default:     false,
			Description: "Enable format on type. Defaults to false.",
		},
		"lineHeight": {
			ID:          "lineHeight",
			Type:        settings.Integer,
			Label:       "Line Height",
			Default:     1,
			Description: "The line height.",
		},
		"lineNumbers": {
			ID:   "lineNumbers",
			Type: settings.Text,
			Options: []settings.SettingOption{
				{Value: "on", Label: "On"},
				{Value: "off", Label: "Off"},
				{Value: "relative", Label: "Relative"},
				{Value: "interval", Label: "Interval"},
			},
			Label:       "Line Numbers",
			Default:     "on",
			Description: "Control the rendering of line numbers. Defaults to 'on'.",
		},
		"lineNumbersMinChars": {
			ID:          "lineNumbersMinChars",
			Type:        settings.Integer,
			Label:       "Line Number Width",
			Default:     5,
			Description: "Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits. Defaults to 5.",
		},
		"minimapEnabled": {
			ID:          "minimapEnabled",
			Type:        settings.Toggle,
			Label:       "Minimap Enabled",
			Default:     true,
			Description: "Enable the rendering of the minimap. Defaults to 'true'",
		},
		"minimapScale": {
			ID:          "minimapScale",
			Type:        settings.Integer,
			Label:       "Minimap Scale",
			Default:     1,
			Description: "Relative size of the font in the minimap. Defaults to 1.",
		},
		"minimapShowSlider": {
			ID:    "minimapShowSlider",
			Type:  settings.Text,
			Label: "Minimap Slider",
			Options: []settings.SettingOption{
				{Value: "mouseover", Label: "Mouseover"},
				{Value: "always", Label: "Always"},
			},
			Default:     "mouseover",
			Description: "Control the rendering of the minimap slider. Defaults to 'mouseover'.",
		},
		"minimapSide": {
			ID:      "minimapSide",
			Type:    settings.Text,
			Label:   "Minimap Side",
			Default: "right",
			Options: []settings.SettingOption{
				{Value: "right", Label: "Right"},
				{Value: "left", Label: "Left"},
			},
			Description: "Control the side of the minimap in editor. Defaults to 'right'",
		},
		"minimapSize": {
			ID:      "minimapSize",
			Type:    settings.Text,
			Label:   "Minimap Size",
			Default: "actual",
			Options: []settings.SettingOption{
				{Value: "actual", Label: "Actual"},
				{Value: "proportional", Label: "Proportional"},
				{Value: "fill", Label: "Fill"},
				{Value: "fit", Label: "Fit"},
			},
			Description: "Control the minimap rendering mode. Defaults to 'actual'.",
		},
	},
}
View Source
var General = settings.Category{
	ID:          "general",
	Label:       "General",
	Description: "General settings for the application",
	Icon:        "LuSettings2",
	Settings: map[string]settings.Setting{

		"language": {
			ID:          "language",
			Type:        settings.Text,
			Label:       "Language",
			Default:     "en",
			Description: "The language to use when displaying text",
			Options: []settings.SettingOption{
				{Value: "en", Label: "English"},
				{Value: "es", Label: "Spanish"},
			},
		},
	},
}
View Source
var Terminal = settings.Category{
	ID:          "terminal",
	Label:       "Terminal",
	Description: "Customize the behavior of the terminal",
	Icon:        "LuSquareTerminal",
	Settings: map[string]settings.Setting{
		"defaultShell": {
			ID:          "defaultShell",
			Type:        settings.Text,
			Label:       "Default Shell",
			Default:     "/bin/zsh",
			Description: "The default shell to use when opening a terminal",
			Validator: func(value interface{}) error {
				val, ok := value.(string)
				if !ok {
					return settings.ErrSettingTypeMismatch
				}
				path, err := exec.LookPath(val)
				if err != nil {
					return fmt.Errorf("could not find executable: %w", err)
				}

				if _, err := os.Stat(path); os.IsNotExist(err) {
					return fmt.Errorf("could not find shell '%s'", val)
				}

				return nil
			},
		},

		"fontSize": {
			ID:          "fontSize",
			Type:        settings.Integer,
			Label:       "Font Size",
			Default:     12,
			Description: "The size of the font in the terminal",
		},
		"cursorStyle": {
			ID:          "cursorStyle",
			Type:        settings.Text,
			Label:       "Cursor Style",
			Default:     "block",
			Description: "The style of the cursor in the terminal",
			Options: []settings.SettingOption{
				{Value: "block", Label: "Block"},
				{Value: "underline", Label: "Underline"},
				{Value: "bar", Label: "Bar"},
			},
		},
		"cursorBlink": {
			ID:          "cursorBlink",
			Type:        settings.Toggle,
			Label:       "Cursor Blink",
			Default:     true,
			Description: "Whether the cursor should blink in the terminal",
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL