lang

package
v0.0.0-...-1ab9dbf Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Modes = newModes()

Functions

This section is empty.

Types

type Mode

type Mode interface {
	Name() string

	HasMatchingExtension(filePath string) bool

	Format(source [][]byte) ([][]byte, error)

	FormatBeforeSave(source [][]byte) ([][]byte, error)

	IndentWidth() int
	IsSoftTAB() bool
}

type ModesStruct

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

func (*ModesStruct) GetDefaultMode

func (ms *ModesStruct) GetDefaultMode() *Mode

Return the first registered *Mode as default mode

func (*ModesStruct) GetMode

func (ms *ModesStruct) GetMode(filePath string) *Mode

Return the first registered *Mode as default mode

func (*ModesStruct) GetModeByName

func (ms *ModesStruct) GetModeByName(name string) *Mode

Return *Mode by Mode Name

func (ModesStruct) GetModes

func (ms ModesStruct) GetModes() []Mode

func (*ModesStruct) Register

func (ms *ModesStruct) Register(mode Mode)

Register Mode

Jump to

Keyboard shortcuts

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