Help us shape the future of Go! Take the 2026 Go Developer Survey

vscode

package
v1.26.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenNewWindow     = "OPEN_NEW_WINDOW"
	SSHConnectTimeout = "SSH_CONNECT_TIMEOUT"
)

Variables

View Source
var Options = ide.Options{
	OpenNewWindow: {
		Name:        OpenNewWindow,
		Description: "If true, Devsy will open the project in a new window",
		Default:     "true",
		Enum: []string{
			"false",
			"true",
		},
	},
	SSHConnectTimeout: {
		Name: SSHConnectTimeout,
		Description: "Remote SSH connection timeout in positive seconds; " +
			"applies globally to this editor flavor's host settings",
		ValidationPattern: `^[1-9][0-9]{0,8}$`,
		ValidationMessage: "SSH_CONNECT_TIMEOUT must be a positive whole number of seconds (at most 999999999)",
	},
}

Functions

func EnsureHostSettings added in v1.3.1

func EnsureHostSettings(flavor Flavor)

EnsureHostSettings ensures required VS Code user settings are configured on the host machine. It disables exec-server mode (useExecServer=false) which is required for both ProxyCommand and tunnel-based SSH connections because VS Code needs a remote TCP port to connect to.

func InstallAPKRequirements

func InstallAPKRequirements()

InstallAPKRequirements installs the requirements using apk.

This is used by Alpine- and Wolfi-based images.

func Open

func Open(ctx context.Context, params OpenParams) error

Types

type Flavor

type Flavor string
const (
	FlavorStable      Flavor = "stable"
	FlavorInsiders    Flavor = "insiders"
	FlavorCursor      Flavor = "cursor"
	FlavorPositron    Flavor = "positron"
	FlavorCodium      Flavor = "codium"
	FlavorWindsurf    Flavor = "windsurf"
	FlavorAntigravity Flavor = "antigravity"
	FlavorBob         Flavor = "bob"
)

func (Flavor) DisplayName

func (f Flavor) DisplayName() string

type OpenParams

type OpenParams struct {
	Workspace         string
	Folder            string
	NewWindow         bool
	Flavor            Flavor
	TunnelMode        bool
	SSHConnectTimeout string
}

type ServerOptions

type ServerOptions struct {
	Extensions []string
	Settings   string
	UserName   string
	Values     map[string]config.OptionValue
	Flavor     Flavor
}

type VsCodeServer

type VsCodeServer struct {
	// contains filtered or unexported fields
}

func NewVSCodeServer

func NewVSCodeServer(opts ServerOptions) *VsCodeServer

func (*VsCodeServer) Install

func (o *VsCodeServer) Install() error

func (*VsCodeServer) InstallExtensions

func (o *VsCodeServer) InstallExtensions() error

Jump to

Keyboard shortcuts

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