configuration

package
v0.1.0-rc.17 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 11 Imported by: 1 module, 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

Overview

Package configuration owns the editor's user resources on the workspace host.

Index

Constants

View Source
const (
	MaxBytes   = 16 << 20
	MaxFiles   = 4096
	MaxEntries = 16384
)

Variables

This section is empty.

Functions

func Directory

func Directory() (string, error)

func Save

func Save(ctx context.Context, directory string, data []byte) error

Save publishes a complete settings object; a failed write preserves the old file.

Types

type LocalHistorySettings

type LocalHistorySettings struct {
	Exclude        map[string]bool `json:"workbench.localHistory.exclude,omitempty"`
	MaxFileSize    int64           `json:"workbench.localHistory.maxFileSize"`
	MaxFileEntries int             `json:"workbench.localHistory.maxFileEntries"`
	MergeWindow    int64           `json:"workbench.localHistory.mergeWindow"`
	Enabled        bool            `json:"workbench.localHistory.enabled"`
}

LocalHistorySettings uses the same setting names and units as VS Code.

func DefaultLocalHistory

func DefaultLocalHistory() LocalHistorySettings

func (*LocalHistorySettings) Validate

func (s *LocalHistorySettings) Validate()

type Snapshot

type Snapshot struct {
	Files     map[string][]byte
	Directory string
}

func Read

func Read(ctx context.Context, directory string) (Snapshot, error)

func (Snapshot) Open

func (s Snapshot) Open(name string) (fs.File, error)

func (Snapshot) ReadFile

func (s Snapshot) ReadFile(name string) ([]byte, error)

Jump to

Keyboard shortcuts

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