MCPcopy Create free account
hub / github.com/cogentcore/core / SetLanguage

Method SetLanguage

texteditor/text/lines.go:164–166  ·  view source on GitHub ↗

SetFileType sets the syntax highlighting and other parameters based on the given fileinfo.Known file type

(ftyp fileinfo.Known)

Source from the content-addressed store, hash-verified

162// SetFileType sets the syntax highlighting and other parameters
163// based on the given fileinfo.Known file type
164func (ls *Lines) SetLanguage(ftyp fileinfo.Known) {
165 ls.SetFileInfo(fileinfo.NewFileInfoType(ftyp))
166}
167
168// SetFileExt sets syntax highlighting and other parameters
169// based on the given file extension (without the . prefix),

Callers

nothing calls this directly

Calls 2

SetFileInfoMethod · 0.95
NewFileInfoTypeFunction · 0.92

Tested by

no test coverage detected