Documentation
¶
Index ¶
- Variables
- type File
- type Language
- type LanguageDef
- type LanguageFunctions
- type LanguageOn
- type Languages
- func (l *Languages) AddLanguage(lang LanguageDef)
- func (l *Languages) CommandProvider() *protocol.ExecuteCommandOptions
- func (l *Languages) CommandsExecute(context *glsp.Context, params *protocol.ExecuteCommandParams) (any, error)
- func (l *Languages) CreateFile(u uri.DocumentURI, langID string, r io.Reader) (File, error)
- func (l *Languages) DeleteUri(u uri.DocumentURI) error
- func (l *Languages) Get(id string) *Language
- func (l *Languages) GetFromUri(uri uri.DocumentURI) (*Language, File)
- func (l *Languages) GetSchema(path string) string
- func (l *Languages) Languages(yield func(LanguageDef) bool)
- func (l *Languages) SetConn(conn *jsonrpc2.Conn)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrLanguageNotFound = errors.New("language not found")
)
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
func (*Language) CreateFile ¶
func (*Language) DeleteUri ¶
func (l *Language) DeleteUri(u uri.DocumentURI)
func (*Language) GetFromUri ¶
func (l *Language) GetFromUri(u uri.DocumentURI) File
func (*Language) On ¶
func (l *Language) On() *LanguageOn
type LanguageDef ¶
type LanguageDef interface {
Init(functions *LanguageFunctions)
Parse(uri uri.DocumentURI, r io.Reader) (File, error)
ID() string
Commands() []commands.Command
Completions() completion.Completions
On() *LanguageOn
}
LanguageDef is the interface that a language must implement to be supported by glsp.
type LanguageFunctions ¶
type LanguageFunctions struct {
GetFile func(uri uri.DocumentURI) (*Language, File)
GetSchema func(path string) string
Notify glsp.NotifyFunc
}
type LanguageOn ¶
func (*LanguageOn) Save ¶
func (l *LanguageOn) Save(f File) error
type Languages ¶
type Languages struct {
// contains filtered or unexported fields
}
func NewLanguages ¶
func NewLanguages() *Languages
func (*Languages) AddLanguage ¶
func (l *Languages) AddLanguage(lang LanguageDef)
func (*Languages) CommandProvider ¶
func (l *Languages) CommandProvider() *protocol.ExecuteCommandOptions
func (*Languages) CommandsExecute ¶
func (*Languages) CreateFile ¶
func (*Languages) GetFromUri ¶
func (l *Languages) GetFromUri(uri uri.DocumentURI) (*Language, File)
func (*Languages) Languages ¶
func (l *Languages) Languages(yield func(LanguageDef) bool)
Click to show internal directories.
Click to hide internal directories.