categories

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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{
		// contains filtered or unexported fields
	},
}
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{
		"marketplace_url": {
			ID:          "marketplace_url",
			Label:       "Marketplace URL",
			Description: "Base URL for the plugin marketplace API. Change this to point to a staging or self-hosted instance.",
			Type:        settings.Text,
			Default:     "https://api.omniview.dev",
		},
		"registry_public_key": {
			ID:    "registry_public_key",
			Label: "Marketplace Signing Key",
			Description: "Hex-encoded Ed25519 public key used to verify plugin artifacts. Leave empty to use " +
				"the built-in key; set it when the marketplace URL points to a staging or self-hosted instance " +
				"that signs with its own key.",
			Type:    settings.Text,
			Default: "",
		},
		"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,
				Extensions:   nil,
				Relative:     false,
				DefaultPath:  "",
			},
		},
		"pnpmpath": {
			ID:          "pnpmpath",
			Label:       "PNPM Path",
			Description: "PNPM binary for standalone plugin development. Named workspaces require their owned launcher; select native pnpm with OMNIVIEW_PNPM_EXECUTABLE when starting the workspace instead.",
			Type:        settings.Text,
			Default:     "",
			FileSelection: &settings.SettingFileSelection{
				Enabled:      true,
				AllowFolders: false,
				Multiple:     false,
				Extensions:   nil,
				Relative:     false,
				DefaultPath:  "",
			},
		},
		"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,
				Extensions:   nil,
				Relative:     false,
				DefaultPath:  "",
			},
		},
	},
}
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.",
		},

		"fontWeight": {
			ID:          "fontWeight",
			Type:        settings.Text,
			Label:       "Font Weight",
			Default:     defaultEditorFontWeight,
			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", Description: ""},
				{Value: "off", Label: "Off", Description: ""},
				{Value: "relative", Label: "Relative", Description: ""},
				{Value: "interval", Label: "Interval", Description: ""},
			},
			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: defaultLineNumbersMinChars,
			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", Description: ""},
				{Value: "always", Label: "Always", Description: ""},
			},
			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", Description: ""},
				{Value: "left", Label: "Left", Description: ""},
			},
			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", Description: ""},
				{Value: "proportional", Label: "Proportional", Description: ""},
				{Value: "fill", Label: "Fill", Description: ""},
				{Value: "fit", Label: "Fit", Description: ""},
			},
			Description: "Control the minimap rendering mode. Defaults to 'actual'.",
		},
		// contains filtered or unexported fields
	},
}
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", Description: ""},
				{Value: "es", Label: "Spanish", Description: ""},
			},
		},
	},
}
View Source
var Telemetry = settings.Category{
	ID:          "telemetry",
	Label:       "Telemetry",
	Description: "Configure observability, logging, tracing, metrics, and profiling",
	Icon:        "LuActivity",
	Settings:    buildTelemetrySettings(),
}
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:     defaultShell(),
			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 _, statErr := os.Stat(path); os.IsNotExist(statErr) {
					return fmt.Errorf("could not find shell '%s'", val)
				}

				return nil
			},
		},

		"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", Description: ""},
				{Value: "underline", Label: "Underline", Description: ""},
				{Value: "bar", Label: "Bar", Description: ""},
			},
		},
		"cursorBlink": {
			ID:          "cursorBlink",
			Type:        settings.Toggle,
			Label:       "Cursor Blink",
			Default:     true,
			Description: "Whether the cursor should blink in the terminal",
		},
		// contains filtered or unexported fields
	},
}

Functions

func MigrateAppearanceValues added in v0.5.0

func MigrateAppearanceValues(values map[string]any) (map[string]any, bool)

MigrateAppearanceValues upgrades known legacy theme IDs without changing extension-provided or otherwise unknown IDs.

func MigrateTerminalValues added in v0.5.0

func MigrateTerminalValues(values map[string]any) (map[string]any, bool)

MigrateTerminalValues upgrades the legacy application-theme sentinel.

Types

type ServiceWrapper added in v0.4.0

type ServiceWrapper struct {
	Provider     pkgsettings.Provider
	CategoryMeta map[string]pkgsettings.Category // Label, Icon, Description for each category
}

ServiceWrapper exposes only frontend-safe methods of pkgsettings.Provider. Excluded: RegisterChangeHandler, RegisterSetting, RegisterSettings

(internal-only methods).

func (*ServiceWrapper) GetBool added in v0.4.0

func (s *ServiceWrapper) GetBool(id string) (bool, error)

func (*ServiceWrapper) GetCategories added in v0.4.0

func (s *ServiceWrapper) GetCategories() []pkgsettings.Category

GetCategories returns all category metadata for the UI settings navigation.

func (*ServiceWrapper) GetCategory added in v0.4.0

func (s *ServiceWrapper) GetCategory(id string) (pkgsettings.Category, error)

GetCategory returns a single settings category by ID, including full metadata (Label, Icon, Description) from the registered category definitions and live setting values from the in-memory provider.

func (*ServiceWrapper) GetCategoryValues added in v0.4.0

func (s *ServiceWrapper) GetCategoryValues(id string) (map[string]any, error)

GetCategoryValues returns a flat map of setting values for a single category.

func (*ServiceWrapper) GetFloat added in v0.4.0

func (s *ServiceWrapper) GetFloat(id string) (float64, error)

func (*ServiceWrapper) GetFloatSlice added in v0.4.0

func (s *ServiceWrapper) GetFloatSlice(id string) ([]float64, error)

func (*ServiceWrapper) GetInt added in v0.4.0

func (s *ServiceWrapper) GetInt(id string) (int, error)

func (*ServiceWrapper) GetIntSlice added in v0.4.0

func (s *ServiceWrapper) GetIntSlice(id string) ([]int, error)

func (*ServiceWrapper) GetSetting added in v0.4.0

func (s *ServiceWrapper) GetSetting(id string) (pkgsettings.Setting, error)

func (*ServiceWrapper) GetSettingValue added in v0.4.0

func (s *ServiceWrapper) GetSettingValue(id string) (any, error)

func (*ServiceWrapper) GetString added in v0.4.0

func (s *ServiceWrapper) GetString(id string) (string, error)

func (*ServiceWrapper) GetStringSlice added in v0.4.0

func (s *ServiceWrapper) GetStringSlice(id string) ([]string, error)

func (*ServiceWrapper) ListSettings added in v0.4.0

func (s *ServiceWrapper) ListSettings() pkgsettings.Store

func (*ServiceWrapper) LoadSettings added in v0.4.0

func (s *ServiceWrapper) LoadSettings() error

LoadSettings is a no-op reload trigger for the frontend. With bbolt-backed persistence, settings are always in memory — this exists so the frontend's "reload" button still has a valid binding. It re-reads from the in-memory store (which is already current).

func (*ServiceWrapper) SetSetting added in v0.4.0

func (s *ServiceWrapper) SetSetting(id string, value any) error

func (*ServiceWrapper) SetSettings added in v0.4.0

func (s *ServiceWrapper) SetSettings(settingsMap map[string]any) error

func (*ServiceWrapper) Values added in v0.4.0

func (s *ServiceWrapper) Values() map[string]any

Values returns a flat map of all setting values keyed by "category.settingID". This is a host-side convenience for the frontend — it was removed from the SDK Provider interface (plugins don't need it) but the UI settings context uses it to populate the full settings state.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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