vscode

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDir

func GetDir(p string) string

GetDir 获取 VSCode 的目录

func GetExtensions

func GetExtensions() map[string][]string

GetExtensions 获取 VSCode 官方支持的所有语言的扩展名

Types

type Settings

type Settings struct {
	Foreground string `json:"foreground,omitempty"`
	FontStyle  string `json:"fontStyle,omitempty"`
}

Settings 代码高亮设置

type Theme

type Theme struct {
	Schema      string            `json:"$schema,omitempty"`
	Colors      map[string]string `json:"colors,omitempty"`
	TokenColors []*TokenColor     `json:"tokenColors,omitempty"`
}

Theme 主题

func GetDefaultDarkTheme

func GetDefaultDarkTheme() *Theme

GetDefaultDarkTheme 获取默认的黑色主题

func GetDefaultLightTheme

func GetDefaultLightTheme() *Theme

GetDefaultLightTheme 获取默认的白色主题

func LoadTheme

func LoadTheme(fs ...string) *Theme

LoadTheme 加载主题

func NewTheme

func NewTheme() *Theme

NewTheme 初始化主题

func (*Theme) GetColorsHex

func (t *Theme) GetColorsHex() []string

GetColorsHex 获取全部界面颜色

func (*Theme) GetTokenColorsHex

func (t *Theme) GetTokenColorsHex() []string

GetTokenColorsHex 获取全部代码颜色

type TokenColor

type TokenColor struct {
	Scope    interface{} `json:"scope,omitempty"`
	Settings Settings    `json:"settings,omitempty"`
}

TokenColor 代码高亮配色方案

func (*TokenColor) GetScope

func (tc *TokenColor) GetScope() []string

GetScope 获取 TokenColor Scope 的确切内容

func (*TokenColor) HasScope

func (tc *TokenColor) HasScope(scope string) bool

HasScope 是否存在某个 Scope

Jump to

Keyboard shortcuts

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