config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFilepath

func ConfigFilepath() string

ConfigFilepath returns the path to the config file

func SaveConfig

func SaveConfig(c *Config)

SaveConfig saves the configuration for the projects switcher

Types

type Config

type Config struct {
	DefaultIDE     ide.IDE_ID       `yaml:"default_ide"`     // The default IDE to use
	ProjectFolders []*ProjectFolder `yaml:"project_folders"` // The folders to look through
	IDE            []*IDEConfig     `yaml:"ide_config"`      // The IDE to configure
}

Config is the configuration for the projects switcher

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration for the projects switcher

func GetConfig

func GetConfig() *Config

GetConfig returns the configuration for the projects switcher

type IDEConfig

type IDEConfig struct {
	IDE        ide.IDE_ID `yaml:"ide"`         // The IDE to configure
	PathFilter string     `yaml:"path_filter"` // The regex filter to apply, if blank then always true
	Custom     string     `yaml:"custom"`      // A custom command to run, if blank then use the default command
}

IDEConfig is the configuration for an IDE

type ProjectFolder

type ProjectFolder struct {
	Folder   string   `yaml:"folder"`   // The folder to look through
	Includes []string `yaml:"includes"` // The regex pattern that must match an item
	Excludes []string `yaml:"excludes"` // The regex pattern that when match will excluded that item
}

ProjectFolder is the configuration for a folder to look through

Jump to

Keyboard shortcuts

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